https://launchpad.net/ubuntu/+source/sphinx/1.8.5-1ubuntu2/+build/17190682 RUN: /usr/share/launchpad-buildd/bin/builder-prep Kernel version: Linux lcy01-amd64-026 4.4.0-154-generic #181-Ubuntu SMP Tue Jun 25 05:29:03 UTC 2019 x86_64 Buildd toolchain package versions: launchpad-buildd_176 python-lpbuildd_176 sbuild_0.67.0-2ubuntu7.1 bzr-builder_0.7.3+bzr174~ppa13~ubuntu14.10.1 bzr_2.7.0-2ubuntu3.1 git-build-recipe_0.3.6~git201906051340.ff11471~ubuntu16.04.1 git_1:2.7.4-0ubuntu1.6 dpkg-dev_1.18.4ubuntu1.5 python-debian_0.1.27ubuntu2. Syncing the system clock with the buildd NTP service... 3 Jul 20:33:59 ntpdate[1903]: adjust time server 10.211.37.1 offset 0.000314 sec RUN: /usr/share/launchpad-buildd/bin/in-target unpack-chroot --backend=chroot --series=eoan --arch=amd64 PACKAGEBUILD-17190682 --image-type chroot /home/buildd/filecache-default/020b0022f770b890c357907d03d82568c584d50e Creating target for build PACKAGEBUILD-17190682 RUN: /usr/share/launchpad-buildd/bin/in-target mount-chroot --backend=chroot --series=eoan --arch=amd64 PACKAGEBUILD-17190682 Starting target for build PACKAGEBUILD-17190682 RUN: /usr/share/launchpad-buildd/bin/in-target override-sources-list --backend=chroot --series=eoan --arch=amd64 PACKAGEBUILD-17190682 'deb http://ftpmaster.internal/ubuntu eoan main universe' 'deb http://ftpmaster.internal/ubuntu eoan-security main universe' 'deb http://ftpmaster.internal/ubuntu eoan-updates main universe' 'deb http://ftpmaster.internal/ubuntu eoan-proposed main universe' Overriding sources.list in build-PACKAGEBUILD-17190682 RUN: /usr/share/launchpad-buildd/bin/in-target update-debian-chroot --backend=chroot --series=eoan --arch=amd64 PACKAGEBUILD-17190682 Updating target for build PACKAGEBUILD-17190682 Get:1 http://ftpmaster.internal/ubuntu eoan InRelease [255 kB] Get:2 http://ftpmaster.internal/ubuntu eoan-security InRelease [79.7 kB] Get:3 http://ftpmaster.internal/ubuntu eoan-updates InRelease [79.7 kB] Get:4 http://ftpmaster.internal/ubuntu eoan-proposed InRelease [106 kB] Get:5 http://ftpmaster.internal/ubuntu eoan/main amd64 Packages [980 kB] Get:6 http://ftpmaster.internal/ubuntu eoan/main Translation-en [503 kB] Get:7 http://ftpmaster.internal/ubuntu eoan/universe amd64 Packages [9016 kB] Get:8 http://ftpmaster.internal/ubuntu eoan/universe Translation-en [5285 kB] Get:9 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 Packages [90.3 kB] Get:10 http://ftpmaster.internal/ubuntu eoan-proposed/main Translation-en [41.4 kB] Get:11 http://ftpmaster.internal/ubuntu eoan-proposed/universe amd64 Packages [182 kB] Get:12 http://ftpmaster.internal/ubuntu eoan-proposed/universe Translation-en [98.1 kB] Fetched 16.7 MB in 3s (6665 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... The following packages were automatically installed and are no longer required: libapt-pkg5.0 libisl19 libjson-c3 libreadline7 Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: gcc-9-base libapt-pkg5.90 libisl21 libjson-c4 libpcre2-8-0 libreadline8 The following packages will be upgraded: adduser advancecomp apt base-files base-passwd bash binutils binutils-common binutils-x86-64-linux-gnu bsdutils build-essential bzip2 ca-certificates coreutils cpp cpp-8 dash debconf debianutils diffutils dmsetup dpkg dpkg-dev e2fslibs e2fsprogs fdisk findutils g++ g++-8 gcc gcc-8 gcc-8-base gpg gpg-agent gpgconf gpgv grep gzip init init-system-helpers libacl1 libapparmor1 libargon2-1 libasan5 libassuan0 libatomic1 libattr1 libaudit-common libaudit1 libbinutils libblkid1 libbz2-1.0 libc-bin libc-dev-bin libc6 libc6-dev libcap-ng0 libcap2 libcc1-0 libcom-err2 libcomerr2 libcryptsetup12 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libdpkg-perl libext2fs2 libfdisk1 libgcc-8-dev libgcc1 libgcrypt20 libgdbm-compat4 libgdbm6 libgnutls30 libgomp1 libgpg-error0 libhogweed4 libidn11 libitm1 libjson-c3 libkmod2 liblsan0 liblz4-1 liblzma5 libmount1 libmpfr6 libmpx2 libncurses6 libncursesw6 libnettle6 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libperl5.28 libpng16-16 libprocps7 libquadmath0 libseccomp2 libselinux1 libsemanage-common libsemanage1 libsepol1 libslang2 libsmartcols1 libsqlite3-0 libss2 libssl1.1 libstdc++-8-dev libstdc++6 libsystemd0 libtinfo6 libtsan0 libubsan1 libudev1 libunistring2 libuuid1 libzstd1 linux-libc-dev login lsb-base mount multiarch-support ncurses-base ncurses-bin openssl optipng passwd patch perl perl-base perl-modules-5.28 pinentry-curses pkgbinarymangler procps readline-common sed systemd systemd-sysv sysvinit-utils tar tzdata util-linux xz-utils zlib1g 147 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. Need to get 78.7 MB of archives. After this operation, 8838 kB of additional disk space will be used. Get:1 http://ftpmaster.internal/ubuntu eoan/main amd64 libc6-dev amd64 2.29-0ubuntu2 [2541 kB] Get:2 http://ftpmaster.internal/ubuntu eoan/main amd64 libc-dev-bin amd64 2.29-0ubuntu2 [71.2 kB] Get:3 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 linux-libc-dev amd64 5.0.0-20.21 [1039 kB] Get:4 http://ftpmaster.internal/ubuntu eoan/main amd64 libc6 amd64 2.29-0ubuntu2 [2707 kB] Get:5 http://ftpmaster.internal/ubuntu eoan/main amd64 libc-bin amd64 2.29-0ubuntu2 [626 kB] Get:6 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 gcc-9-base amd64 9.1.0-5ubuntu1 [18.1 kB] Get:7 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libgcc1 amd64 1:9.1.0-5ubuntu1 [40.7 kB] Get:8 http://ftpmaster.internal/ubuntu eoan/main amd64 base-files amd64 10.2ubuntu3 [60.4 kB] Get:9 http://ftpmaster.internal/ubuntu eoan/main amd64 debianutils amd64 4.8.6.1 [85.5 kB] Get:10 http://ftpmaster.internal/ubuntu eoan/main amd64 bash amd64 5.0-4ubuntu1 [635 kB] Get:11 http://ftpmaster.internal/ubuntu eoan/main amd64 bsdutils amd64 1:2.33.1-0.1ubuntu2 [63.8 kB] Get:12 http://ftpmaster.internal/ubuntu eoan/main amd64 coreutils amd64 8.30-3ubuntu1 [1243 kB] Get:13 http://ftpmaster.internal/ubuntu eoan/main amd64 lsb-base all 10.2019051400ubuntu1 [12.4 kB] Get:14 http://ftpmaster.internal/ubuntu eoan/main amd64 tar amd64 1.30+dfsg-6 [243 kB] Get:15 http://ftpmaster.internal/ubuntu eoan/main amd64 dpkg amd64 1.19.6ubuntu1 [1132 kB] Get:16 http://ftpmaster.internal/ubuntu eoan/main amd64 libperl5.28 amd64 5.28.1-6 [3827 kB] Get:17 http://ftpmaster.internal/ubuntu eoan/main amd64 perl amd64 5.28.1-6 [204 kB] Get:18 http://ftpmaster.internal/ubuntu eoan/main amd64 perl-base amd64 5.28.1-6 [1511 kB] Get:19 http://ftpmaster.internal/ubuntu eoan/main amd64 perl-modules-5.28 all 5.28.1-6 [2818 kB] Get:20 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 bzip2 amd64 1.0.6-9.1 [33.8 kB] Get:21 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libbz2-1.0 amd64 1.0.6-9.1 [32.3 kB] Get:22 http://ftpmaster.internal/ubuntu eoan/main amd64 libdb5.3 amd64 5.3.28+dfsg1-0.6ubuntu1 [672 kB] Get:23 http://ftpmaster.internal/ubuntu eoan/main amd64 libgdbm6 amd64 1.18.1-4 [27.4 kB] Get:24 http://ftpmaster.internal/ubuntu eoan/main amd64 libgdbm-compat4 amd64 1.18.1-4 [6152 B] Get:25 http://ftpmaster.internal/ubuntu eoan/main amd64 zlib1g amd64 1:1.2.11.dfsg-1ubuntu2 [54.0 kB] Get:26 http://ftpmaster.internal/ubuntu eoan/main amd64 debconf all 1.5.72 [122 kB] Get:27 http://ftpmaster.internal/ubuntu eoan/main amd64 dash amd64 0.5.10.2-5 [85.9 kB] Get:28 http://ftpmaster.internal/ubuntu eoan/main amd64 diffutils amd64 1:3.7-3 [200 kB] Get:29 http://ftpmaster.internal/ubuntu eoan/main amd64 findutils amd64 4.6.0+git+20190209-2 [329 kB] Get:30 http://ftpmaster.internal/ubuntu eoan/main amd64 grep amd64 3.3-1 [149 kB] Get:31 http://ftpmaster.internal/ubuntu eoan/main amd64 gzip amd64 1.10-0ubuntu1 [94.4 kB] Get:32 http://ftpmaster.internal/ubuntu eoan/main amd64 libsmartcols1 amd64 2.33.1-0.1ubuntu2 [92.1 kB] Get:33 http://ftpmaster.internal/ubuntu eoan/main amd64 libuuid1 amd64 2.33.1-0.1ubuntu2 [21.0 kB] Get:34 http://ftpmaster.internal/ubuntu eoan/main amd64 libblkid1 amd64 2.33.1-0.1ubuntu2 [134 kB] Get:35 http://ftpmaster.internal/ubuntu eoan/main amd64 libfdisk1 amd64 2.33.1-0.1ubuntu2 [173 kB] Get:36 http://ftpmaster.internal/ubuntu eoan/main amd64 libpcre2-8-0 amd64 10.32-5 [180 kB] Get:37 http://ftpmaster.internal/ubuntu eoan/main amd64 libselinux1 amd64 2.9-1 [69.3 kB] Get:38 http://ftpmaster.internal/ubuntu eoan/main amd64 libmount1 amd64 2.33.1-0.1ubuntu2 [145 kB] Get:39 http://ftpmaster.internal/ubuntu eoan/main amd64 libncurses6 amd64 6.1+20181013-2ubuntu2 [101 kB] Get:40 http://ftpmaster.internal/ubuntu eoan/main amd64 libtinfo6 amd64 6.1+20181013-2ubuntu2 [83.8 kB] Get:41 http://ftpmaster.internal/ubuntu eoan/main amd64 libncursesw6 amd64 6.1+20181013-2ubuntu2 [131 kB] Get:42 http://ftpmaster.internal/ubuntu eoan/main amd64 fdisk amd64 2.33.1-0.1ubuntu2 [119 kB] Get:43 http://ftpmaster.internal/ubuntu eoan/main amd64 login amd64 1:4.5-1.1ubuntu2 [264 kB] Get:44 http://ftpmaster.internal/ubuntu eoan/main amd64 util-linux amd64 2.33.1-0.1ubuntu2 [1002 kB] Get:45 http://ftpmaster.internal/ubuntu eoan/main amd64 ncurses-bin amd64 6.1+20181013-2ubuntu2 [164 kB] Get:46 http://ftpmaster.internal/ubuntu eoan/main amd64 sed amd64 4.7-1 [190 kB] Get:47 http://ftpmaster.internal/ubuntu eoan/main amd64 libdebconfclient0 amd64 0.249ubuntu1 [6388 B] Get:48 http://ftpmaster.internal/ubuntu eoan/main amd64 base-passwd amd64 3.5.46 [47.4 kB] Get:49 http://ftpmaster.internal/ubuntu eoan/main amd64 init-system-helpers all 1.57 [38.3 kB] Get:50 http://ftpmaster.internal/ubuntu eoan/main amd64 ncurses-base all 6.1+20181013-2ubuntu2 [17.9 kB] Get:51 http://ftpmaster.internal/ubuntu eoan/main amd64 sysvinit-utils amd64 2.93-8ubuntu1 [19.4 kB] Get:52 http://ftpmaster.internal/ubuntu eoan/main amd64 liblz4-1 amd64 1.9.1-1 [54.6 kB] Get:53 http://ftpmaster.internal/ubuntu eoan/main amd64 liblzma5 amd64 5.2.4-1 [92.4 kB] Get:54 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libstdc++6 amd64 9.1.0-5ubuntu1 [511 kB] Get:55 http://ftpmaster.internal/ubuntu eoan/main amd64 libnettle6 amd64 3.4.1-1 [110 kB] Get:56 http://ftpmaster.internal/ubuntu eoan/main amd64 libhogweed4 amd64 3.4.1-1 [140 kB] Get:57 http://ftpmaster.internal/ubuntu eoan/main amd64 libp11-kit0 amd64 0.23.15-2 [184 kB] Get:58 http://ftpmaster.internal/ubuntu eoan/main amd64 libunistring2 amd64 0.9.10-1ubuntu2 [369 kB] Get:59 http://ftpmaster.internal/ubuntu eoan/main amd64 libgnutls30 amd64 3.6.7-4ubuntu1 [771 kB] Get:60 http://ftpmaster.internal/ubuntu eoan/main amd64 systemd-sysv amd64 240-6ubuntu9 [9380 B] Get:61 http://ftpmaster.internal/ubuntu eoan/main amd64 libacl1 amd64 2.2.53-4 [18.3 kB] Get:62 http://ftpmaster.internal/ubuntu eoan/main amd64 libapparmor1 amd64 2.13.2-9ubuntu7 [34.6 kB] Get:63 http://ftpmaster.internal/ubuntu eoan/main amd64 libaudit-common all 1:2.8.4-3ubuntu1 [4200 B] Get:64 http://ftpmaster.internal/ubuntu eoan/main amd64 libcap-ng0 amd64 0.7.9-2 [11.0 kB] Get:65 http://ftpmaster.internal/ubuntu eoan/main amd64 libaudit1 amd64 1:2.8.4-3ubuntu1 [38.9 kB] Get:66 http://ftpmaster.internal/ubuntu eoan/main amd64 libcap2 amd64 1:2.25-2 [13.3 kB] Get:67 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libjson-c4 amd64 0.13.1+dfsg-2 [28.8 kB] Get:68 http://ftpmaster.internal/ubuntu eoan/main amd64 libargon2-1 amd64 0~20171227-0.2 [19.2 kB] Get:69 http://ftpmaster.internal/ubuntu eoan/main amd64 libudev1 amd64 240-6ubuntu9 [65.3 kB] Get:70 http://ftpmaster.internal/ubuntu eoan/main amd64 libdevmapper1.02.1 amd64 2:1.02.155-2ubuntu4 [127 kB] Get:71 http://ftpmaster.internal/ubuntu eoan/main amd64 libssl1.1 amd64 1.1.1c-1ubuntu3 [1312 kB] Get:72 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libcryptsetup12 amd64 2:2.1.0-5ubuntu2 [148 kB] Get:73 http://ftpmaster.internal/ubuntu eoan/main amd64 libgpg-error0 amd64 1.36-1 [57.7 kB] Get:74 http://ftpmaster.internal/ubuntu eoan/main amd64 libidn11 amd64 1.33-2.2ubuntu2 [46.2 kB] Get:75 http://ftpmaster.internal/ubuntu eoan/main amd64 libkmod2 amd64 26-1ubuntu1 [42.8 kB] Get:76 http://ftpmaster.internal/ubuntu eoan/main amd64 libpam0g amd64 1.3.1-5ubuntu1 [56.2 kB] Get:77 http://ftpmaster.internal/ubuntu eoan/main amd64 libseccomp2 amd64 2.4.1-0ubuntu0.19.10.3 [39.0 kB] Get:78 http://ftpmaster.internal/ubuntu eoan/main amd64 mount amd64 2.33.1-0.1ubuntu2 [113 kB] Get:79 http://ftpmaster.internal/ubuntu eoan/main amd64 libsepol1 amd64 2.9-1 [254 kB] Get:80 http://ftpmaster.internal/ubuntu eoan/main amd64 libsemanage-common all 2.9-1 [9916 B] Get:81 http://ftpmaster.internal/ubuntu eoan/main amd64 libsemanage1 amd64 2.9-1 [85.4 kB] Get:82 http://ftpmaster.internal/ubuntu eoan/main amd64 libpam-modules-bin amd64 1.3.1-5ubuntu1 [38.1 kB] Get:83 http://ftpmaster.internal/ubuntu eoan/main amd64 libpam-modules amd64 1.3.1-5ubuntu1 [248 kB] Get:84 http://ftpmaster.internal/ubuntu eoan/main amd64 passwd amd64 1:4.5-1.1ubuntu2 [816 kB] Get:85 http://ftpmaster.internal/ubuntu eoan/main amd64 adduser all 3.118ubuntu1 [163 kB] Get:86 http://ftpmaster.internal/ubuntu eoan/main amd64 systemd amd64 240-6ubuntu9 [3337 kB] Get:87 http://ftpmaster.internal/ubuntu eoan/main amd64 libsystemd0 amd64 240-6ubuntu9 [245 kB] Get:88 http://ftpmaster.internal/ubuntu eoan/main amd64 libzstd1 amd64 1.3.8+dfsg-3 [226 kB] Get:89 http://ftpmaster.internal/ubuntu eoan/main amd64 libapt-pkg5.90 amd64 1.9.1 [825 kB] Get:90 http://ftpmaster.internal/ubuntu eoan/main amd64 libgcrypt20 amd64 1.8.4-5ubuntu1 [419 kB] Get:91 http://ftpmaster.internal/ubuntu eoan/main amd64 gpgv amd64 2.2.12-1ubuntu3 [197 kB] Get:92 http://ftpmaster.internal/ubuntu eoan/main amd64 apt amd64 1.9.1 [1276 kB] Get:93 http://ftpmaster.internal/ubuntu eoan/main amd64 libext2fs2 amd64 1.45.2-1ubuntu1 [184 kB] Get:94 http://ftpmaster.internal/ubuntu eoan/main amd64 e2fsprogs amd64 1.45.2-1ubuntu1 [534 kB] Get:95 http://ftpmaster.internal/ubuntu eoan/main amd64 init amd64 1.57 [6088 B] Get:96 http://ftpmaster.internal/ubuntu eoan/main amd64 libattr1 amd64 1:2.4.48-4 [12.6 kB] Get:97 http://ftpmaster.internal/ubuntu eoan/main amd64 libpam-runtime all 1.3.1-5ubuntu1 [37.3 kB] Get:98 http://ftpmaster.internal/ubuntu eoan/main amd64 libpcre3 amd64 2:8.39-12 [231 kB] Get:99 http://ftpmaster.internal/ubuntu eoan/main amd64 libcom-err2 amd64 1.45.2-1ubuntu1 [9920 B] Get:100 http://ftpmaster.internal/ubuntu eoan/main amd64 libprocps7 amd64 2:3.3.15-2ubuntu2 [32.8 kB] Get:101 http://ftpmaster.internal/ubuntu eoan/main amd64 libss2 amd64 1.45.2-1ubuntu1 [11.3 kB] Get:102 http://ftpmaster.internal/ubuntu eoan/main amd64 procps amd64 2:3.3.15-2ubuntu2 [231 kB] Get:103 http://ftpmaster.internal/ubuntu eoan/main amd64 openssl amd64 1.1.1c-1ubuntu3 [621 kB] Get:104 http://ftpmaster.internal/ubuntu eoan/main amd64 ca-certificates all 20190110 [146 kB] Get:105 http://ftpmaster.internal/ubuntu eoan/main amd64 dmsetup amd64 2:1.02.155-2ubuntu4 [75.2 kB] Get:106 http://ftpmaster.internal/ubuntu eoan/main amd64 libjson-c3 amd64 0.12.1+ds-2 [22.2 kB] Get:107 http://ftpmaster.internal/ubuntu eoan/main amd64 readline-common all 8.0-1 [53.4 kB] Get:108 http://ftpmaster.internal/ubuntu eoan/main amd64 libreadline8 amd64 8.0-1 [130 kB] Get:109 http://ftpmaster.internal/ubuntu eoan/main amd64 libslang2 amd64 2.3.2-3 [427 kB] Get:110 http://ftpmaster.internal/ubuntu eoan/main amd64 libsqlite3-0 amd64 3.27.2-3 [533 kB] Get:111 http://ftpmaster.internal/ubuntu eoan/main amd64 tzdata all 2019a-1 [187 kB] Get:112 http://ftpmaster.internal/ubuntu eoan/main amd64 xz-utils amd64 5.2.4-1 [82.5 kB] Get:113 http://ftpmaster.internal/ubuntu eoan/main amd64 libpng16-16 amd64 1.6.37-1 [179 kB] Get:114 http://ftpmaster.internal/ubuntu eoan/main amd64 multiarch-support amd64 2.29-0ubuntu2 [6916 B] Get:115 http://ftpmaster.internal/ubuntu eoan/main amd64 advancecomp amd64 2.1-2.1 [205 kB] Get:116 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 binutils-x86-64-linux-gnu amd64 2.32.51.20190702-1ubuntu1 [1903 kB] Get:117 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libbinutils amd64 2.32.51.20190702-1ubuntu1 [471 kB] Get:118 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 binutils amd64 2.32.51.20190702-1ubuntu1 [3392 B] Get:119 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 binutils-common amd64 2.32.51.20190702-1ubuntu1 [202 kB] Get:120 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libubsan1 amd64 9.1.0-5ubuntu1 [130 kB] Get:121 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libtsan0 amd64 9.1.0-5ubuntu1 [301 kB] Get:122 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libgomp1 amd64 9.1.0-5ubuntu1 [89.2 kB] Get:123 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libitm1 amd64 9.1.0-5ubuntu1 [28.0 kB] Get:124 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libatomic1 amd64 9.1.0-5ubuntu1 [9176 B] Get:125 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libasan5 amd64 9.1.0-5ubuntu1 [395 kB] Get:126 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 liblsan0 amd64 9.1.0-5ubuntu1 [139 kB] Get:127 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libmpx2 amd64 8.3.0-16ubuntu3 [11.7 kB] Get:128 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libquadmath0 amd64 9.1.0-5ubuntu1 [146 kB] Get:129 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 g++-8 amd64 8.3.0-16ubuntu3 [9804 kB] Get:130 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libstdc++-8-dev amd64 8.3.0-16ubuntu3 [1534 kB] Get:131 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 gcc-8 amd64 8.3.0-16ubuntu3 [9404 kB] Get:132 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libgcc-8-dev amd64 8.3.0-16ubuntu3 [2313 kB] Get:133 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libcc1-0 amd64 9.1.0-5ubuntu1 [48.9 kB] Get:134 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 cpp-8 amd64 8.3.0-16ubuntu3 [8648 kB] Get:135 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 gcc-8-base amd64 8.3.0-16ubuntu3 [18.4 kB] Get:136 http://ftpmaster.internal/ubuntu eoan/main amd64 libisl21 amd64 0.21-1 [571 kB] Get:137 http://ftpmaster.internal/ubuntu eoan/main amd64 libmpfr6 amd64 4.0.2-1 [240 kB] Get:138 http://ftpmaster.internal/ubuntu eoan/main amd64 g++ amd64 4:8.3.0-1ubuntu3 [1600 B] Get:139 http://ftpmaster.internal/ubuntu eoan/main amd64 gcc amd64 4:8.3.0-1ubuntu3 [5212 B] Get:140 http://ftpmaster.internal/ubuntu eoan/main amd64 cpp amd64 4:8.3.0-1ubuntu3 [27.6 kB] Get:141 http://ftpmaster.internal/ubuntu eoan/main amd64 dpkg-dev all 1.19.6ubuntu1 [675 kB] Get:142 http://ftpmaster.internal/ubuntu eoan/main amd64 libdpkg-perl all 1.19.6ubuntu1 [230 kB] Get:143 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 patch amd64 2.7.6-4 [105 kB] Get:144 http://ftpmaster.internal/ubuntu eoan/main amd64 build-essential amd64 12.6ubuntu1 [4664 B] Get:145 http://ftpmaster.internal/ubuntu eoan/main amd64 e2fslibs amd64 1.45.2-1ubuntu1 [2716 B] Get:146 http://ftpmaster.internal/ubuntu eoan/main amd64 libassuan0 amd64 2.5.3-1 [35.4 kB] Get:147 http://ftpmaster.internal/ubuntu eoan/main amd64 pinentry-curses amd64 1.1.0-2 [36.1 kB] Get:148 http://ftpmaster.internal/ubuntu eoan/main amd64 gpg amd64 2.2.12-1ubuntu3 [475 kB] Get:149 http://ftpmaster.internal/ubuntu eoan/main amd64 gpgconf amd64 2.2.12-1ubuntu3 [123 kB] Get:150 http://ftpmaster.internal/ubuntu eoan/main amd64 gpg-agent amd64 2.2.12-1ubuntu3 [229 kB] Get:151 http://ftpmaster.internal/ubuntu eoan/main amd64 libcomerr2 amd64 1.45.2-1ubuntu1 [2704 B] Get:152 http://ftpmaster.internal/ubuntu eoan/main amd64 optipng amd64 0.7.7-1 [83.9 kB] Get:153 http://ftpmaster.internal/ubuntu eoan/main amd64 pkgbinarymangler all 144 [55.2 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 78.7 MB in 1s (69.4 MB/s) (Reading database ... 12665 files and directories currently installed.) Preparing to unpack .../libc6-dev_2.29-0ubuntu2_amd64.deb ... Unpacking libc6-dev:amd64 (2.29-0ubuntu2) over (2.28-0ubuntu1) ... Preparing to unpack .../libc-dev-bin_2.29-0ubuntu2_amd64.deb ... Unpacking libc-dev-bin (2.29-0ubuntu2) over (2.28-0ubuntu1) ... Preparing to unpack .../linux-libc-dev_5.0.0-20.21_amd64.deb ... Unpacking linux-libc-dev:amd64 (5.0.0-20.21) over (4.18.0-11.12) ... Preparing to unpack .../libc6_2.29-0ubuntu2_amd64.deb ... Unpacking libc6:amd64 (2.29-0ubuntu2) over (2.28-0ubuntu1) ... Setting up libc6:amd64 (2.29-0ubuntu2) ... (Reading database ... 12693 files and directories currently installed.) Preparing to unpack .../libc-bin_2.29-0ubuntu2_amd64.deb ... Unpacking libc-bin (2.29-0ubuntu2) over (2.28-0ubuntu1) ... Setting up libc-bin (2.29-0ubuntu2) ... Selecting previously unselected package gcc-9-base:amd64. (Reading database ... 12693 files and directories currently installed.) Preparing to unpack .../gcc-9-base_9.1.0-5ubuntu1_amd64.deb ... Unpacking gcc-9-base:amd64 (9.1.0-5ubuntu1) ... Setting up gcc-9-base:amd64 (9.1.0-5ubuntu1) ... (Reading database ... 12699 files and directories currently installed.) Preparing to unpack .../libgcc1_1%3a9.1.0-5ubuntu1_amd64.deb ... Unpacking libgcc1:amd64 (1:9.1.0-5ubuntu1) over (1:8.2.0-12ubuntu1) ... Setting up libgcc1:amd64 (1:9.1.0-5ubuntu1) ... (Reading database ... 12699 files and directories currently installed.) Preparing to unpack .../base-files_10.2ubuntu3_amd64.deb ... Unpacking base-files (10.2ubuntu3) over (10.1ubuntu8) ... Setting up base-files (10.2ubuntu3) ... Installing new version of config file /etc/issue ... Installing new version of config file /etc/issue.net ... Installing new version of config file /etc/lsb-release ... (Reading database ... 12699 files and directories currently installed.) Preparing to unpack .../debianutils_4.8.6.1_amd64.deb ... Unpacking debianutils (4.8.6.1) over (4.8.6) ... Setting up debianutils (4.8.6.1) ... (Reading database ... 12699 files and directories currently installed.) Preparing to unpack .../bash_5.0-4ubuntu1_amd64.deb ... Unpacking bash (5.0-4ubuntu1) over (4.4.18-2ubuntu3) ... Setting up bash (5.0-4ubuntu1) ... update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode (Reading database ... 12699 files and directories currently installed.) Preparing to unpack .../bsdutils_1%3a2.33.1-0.1ubuntu2_amd64.deb ... Unpacking bsdutils (1:2.33.1-0.1ubuntu2) over (1:2.32-0.1ubuntu2) ... Setting up bsdutils (1:2.33.1-0.1ubuntu2) ... (Reading database ... 12699 files and directories currently installed.) Preparing to unpack .../coreutils_8.30-3ubuntu1_amd64.deb ... Unpacking coreutils (8.30-3ubuntu1) over (8.28-1ubuntu2) ... Setting up coreutils (8.30-3ubuntu1) ... (Reading database ... 12699 files and directories currently installed.) Preparing to unpack .../lsb-base_10.2019051400ubuntu1_all.deb ... Unpacking lsb-base (10.2019051400ubuntu1) over (9.20170808ubuntu1) ... Preparing to unpack .../tar_1.30+dfsg-6_amd64.deb ... Unpacking tar (1.30+dfsg-6) over (1.30+dfsg-3) ... Setting up tar (1.30+dfsg-6) ... (Reading database ... 12698 files and directories currently installed.) Preparing to unpack .../dpkg_1.19.6ubuntu1_amd64.deb ... Unpacking dpkg (1.19.6ubuntu1) over (1.19.2ubuntu1) ... Setting up dpkg (1.19.6ubuntu1) ... Installing new version of config file /etc/cron.daily/dpkg ... (Reading database ... 12706 files and directories currently installed.) Preparing to unpack .../libperl5.28_5.28.1-6_amd64.deb ... Unpacking libperl5.28:amd64 (5.28.1-6) over (5.28.1-3) ... Preparing to unpack .../perl_5.28.1-6_amd64.deb ... Unpacking perl (5.28.1-6) over (5.28.1-3) ... Preparing to unpack .../perl-base_5.28.1-6_amd64.deb ... Unpacking perl-base (5.28.1-6) over (5.28.1-3) ... Setting up perl-base (5.28.1-6) ... (Reading database ... 12706 files and directories currently installed.) Preparing to unpack .../perl-modules-5.28_5.28.1-6_all.deb ... Unpacking perl-modules-5.28 (5.28.1-6) over (5.28.1-3) ... Preparing to unpack .../bzip2_1.0.6-9.1_amd64.deb ... Unpacking bzip2 (1.0.6-9.1) over (1.0.6-9) ... Preparing to unpack .../libbz2-1.0_1.0.6-9.1_amd64.deb ... Unpacking libbz2-1.0:amd64 (1.0.6-9.1) over (1.0.6-9) ... Setting up libbz2-1.0:amd64 (1.0.6-9.1) ... (Reading database ... 12706 files and directories currently installed.) Preparing to unpack .../libdb5.3_5.3.28+dfsg1-0.6ubuntu1_amd64.deb ... Unpacking libdb5.3:amd64 (5.3.28+dfsg1-0.6ubuntu1) over (5.3.28+dfsg1-0.2) ... Setting up libdb5.3:amd64 (5.3.28+dfsg1-0.6ubuntu1) ... (Reading database ... 12706 files and directories currently installed.) Preparing to unpack .../libgdbm6_1.18.1-4_amd64.deb ... Unpacking libgdbm6:amd64 (1.18.1-4) over (1.18.1-2) ... Preparing to unpack .../libgdbm-compat4_1.18.1-4_amd64.deb ... Unpacking libgdbm-compat4:amd64 (1.18.1-4) over (1.18.1-2) ... Preparing to unpack .../zlib1g_1%3a1.2.11.dfsg-1ubuntu2_amd64.deb ... Unpacking zlib1g:amd64 (1:1.2.11.dfsg-1ubuntu2) over (1:1.2.11.dfsg-0ubuntu2) ... Setting up zlib1g:amd64 (1:1.2.11.dfsg-1ubuntu2) ... (Reading database ... 12706 files and directories currently installed.) Preparing to unpack .../debconf_1.5.72_all.deb ... Unpacking debconf (1.5.72) over (1.5.69) ... Setting up debconf (1.5.72) ... (Reading database ... 12706 files and directories currently installed.) Preparing to unpack .../dash_0.5.10.2-5_amd64.deb ... Unpacking dash (0.5.10.2-5) over (0.5.10.2-2) ... Setting up dash (0.5.10.2-5) ... (Reading database ... 12707 files and directories currently installed.) Preparing to unpack .../diffutils_1%3a3.7-3_amd64.deb ... Unpacking diffutils (1:3.7-3) over (1:3.6-1) ... Setting up diffutils (1:3.7-3) ... (Reading database ... 12707 files and directories currently installed.) Preparing to unpack .../findutils_4.6.0+git+20190209-2_amd64.deb ... Unpacking findutils (4.6.0+git+20190209-2) over (4.6.0+git+20181018-1) ... Setting up findutils (4.6.0+git+20190209-2) ... (Reading database ... 12707 files and directories currently installed.) Preparing to unpack .../archives/grep_3.3-1_amd64.deb ... Unpacking grep (3.3-1) over (3.1-3) ... Setting up grep (3.3-1) ... (Reading database ... 12707 files and directories currently installed.) Preparing to unpack .../gzip_1.10-0ubuntu1_amd64.deb ... Unpacking gzip (1.10-0ubuntu1) over (1.6-5ubuntu2) ... Setting up gzip (1.10-0ubuntu1) ... (Reading database ... 12707 files and directories currently installed.) Preparing to unpack .../libsmartcols1_2.33.1-0.1ubuntu2_amd64.deb ... Unpacking libsmartcols1:amd64 (2.33.1-0.1ubuntu2) over (2.32-0.1ubuntu2) ... Setting up libsmartcols1:amd64 (2.33.1-0.1ubuntu2) ... (Reading database ... 12707 files and directories currently installed.) Preparing to unpack .../libuuid1_2.33.1-0.1ubuntu2_amd64.deb ... Unpacking libuuid1:amd64 (2.33.1-0.1ubuntu2) over (2.32-0.1ubuntu2) ... Setting up libuuid1:amd64 (2.33.1-0.1ubuntu2) ... (Reading database ... 12707 files and directories currently installed.) Preparing to unpack .../libblkid1_2.33.1-0.1ubuntu2_amd64.deb ... Unpacking libblkid1:amd64 (2.33.1-0.1ubuntu2) over (2.32-0.1ubuntu2) ... Setting up libblkid1:amd64 (2.33.1-0.1ubuntu2) ... (Reading database ... 12707 files and directories currently installed.) Preparing to unpack .../libfdisk1_2.33.1-0.1ubuntu2_amd64.deb ... Unpacking libfdisk1:amd64 (2.33.1-0.1ubuntu2) over (2.32-0.1ubuntu2) ... Setting up libfdisk1:amd64 (2.33.1-0.1ubuntu2) ... Selecting previously unselected package libpcre2-8-0:amd64. (Reading database ... 12707 files and directories currently installed.) Preparing to unpack .../libpcre2-8-0_10.32-5_amd64.deb ... Unpacking libpcre2-8-0:amd64 (10.32-5) ... Setting up libpcre2-8-0:amd64 (10.32-5) ... (Reading database ... 12713 files and directories currently installed.) Preparing to unpack .../libselinux1_2.9-1_amd64.deb ... Unpacking libselinux1:amd64 (2.9-1) over (2.8-1build2) ... Setting up libselinux1:amd64 (2.9-1) ... (Reading database ... 12713 files and directories currently installed.) Preparing to unpack .../libmount1_2.33.1-0.1ubuntu2_amd64.deb ... Unpacking libmount1:amd64 (2.33.1-0.1ubuntu2) over (2.32-0.1ubuntu2) ... Setting up libmount1:amd64 (2.33.1-0.1ubuntu2) ... (Reading database ... 12713 files and directories currently installed.) Preparing to unpack .../libncurses6_6.1+20181013-2ubuntu2_amd64.deb ... Unpacking libncurses6:amd64 (6.1+20181013-2ubuntu2) over (6.1+20180210-4ubuntu1) ... Preparing to unpack .../libtinfo6_6.1+20181013-2ubuntu2_amd64.deb ... Unpacking libtinfo6:amd64 (6.1+20181013-2ubuntu2) over (6.1+20180210-4ubuntu1) ... Setting up libtinfo6:amd64 (6.1+20181013-2ubuntu2) ... (Reading database ... 12713 files and directories currently installed.) Preparing to unpack .../libncursesw6_6.1+20181013-2ubuntu2_amd64.deb ... Unpacking libncursesw6:amd64 (6.1+20181013-2ubuntu2) over (6.1+20180210-4ubuntu1) ... Setting up libncursesw6:amd64 (6.1+20181013-2ubuntu2) ... (Reading database ... 12713 files and directories currently installed.) Preparing to unpack .../fdisk_2.33.1-0.1ubuntu2_amd64.deb ... Unpacking fdisk (2.33.1-0.1ubuntu2) over (2.32-0.1ubuntu2) ... Setting up fdisk (2.33.1-0.1ubuntu2) ... (Reading database ... 12716 files and directories currently installed.) Preparing to unpack .../util-linux_2.33.1-0.1ubuntu2_amd64.deb ... Unpacking util-linux (2.33.1-0.1ubuntu2) over (2.32-0.1ubuntu2) ... Replacing files in old package login (1:4.5-1ubuntu1) ... Preparing to unpack .../login_1%3a4.5-1.1ubuntu2_amd64.deb ... Unpacking login (1:4.5-1.1ubuntu2) over (1:4.5-1ubuntu1) ... Setting up login (1:4.5-1.1ubuntu2) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../ncurses-bin_6.1+20181013-2ubuntu2_amd64.deb ... Unpacking ncurses-bin (6.1+20181013-2ubuntu2) over (6.1+20180210-4ubuntu1) ... Setting up ncurses-bin (6.1+20181013-2ubuntu2) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../archives/sed_4.7-1_amd64.deb ... Unpacking sed (4.7-1) over (4.5-2) ... Setting up sed (4.7-1) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../libdebconfclient0_0.249ubuntu1_amd64.deb ... Unpacking libdebconfclient0:amd64 (0.249ubuntu1) over (0.244ubuntu1) ... Setting up libdebconfclient0:amd64 (0.249ubuntu1) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../base-passwd_3.5.46_amd64.deb ... Unpacking base-passwd (3.5.46) over (3.5.45) ... Setting up base-passwd (3.5.46) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../init-system-helpers_1.57_all.deb ... Unpacking init-system-helpers (1.57) over (1.56) ... Setting up init-system-helpers (1.57) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../ncurses-base_6.1+20181013-2ubuntu2_all.deb ... Unpacking ncurses-base (6.1+20181013-2ubuntu2) over (6.1+20180210-4ubuntu1) ... Setting up ncurses-base (6.1+20181013-2ubuntu2) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../sysvinit-utils_2.93-8ubuntu1_amd64.deb ... Unpacking sysvinit-utils (2.93-8ubuntu1) over (2.88dsf-59.10ubuntu2) ... Setting up util-linux (2.33.1-0.1ubuntu2) ... Setting up sysvinit-utils (2.93-8ubuntu1) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../liblz4-1_1.9.1-1_amd64.deb ... Unpacking liblz4-1:amd64 (1.9.1-1) over (1.8.2-1ubuntu1) ... Setting up liblz4-1:amd64 (1.9.1-1) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../liblzma5_5.2.4-1_amd64.deb ... Unpacking liblzma5:amd64 (5.2.4-1) over (5.2.2-1.3) ... Setting up liblzma5:amd64 (5.2.4-1) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../libstdc++6_9.1.0-5ubuntu1_amd64.deb ... Unpacking libstdc++6:amd64 (9.1.0-5ubuntu1) over (8.2.0-12ubuntu1) ... Setting up libstdc++6:amd64 (9.1.0-5ubuntu1) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../libnettle6_3.4.1-1_amd64.deb ... Unpacking libnettle6:amd64 (3.4.1-1) over (3.4.1~rc1-1) ... Setting up libnettle6:amd64 (3.4.1-1) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../libhogweed4_3.4.1-1_amd64.deb ... Unpacking libhogweed4:amd64 (3.4.1-1) over (3.4.1~rc1-1) ... Setting up libhogweed4:amd64 (3.4.1-1) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../libp11-kit0_0.23.15-2_amd64.deb ... Unpacking libp11-kit0:amd64 (0.23.15-2) over (0.23.14-2) ... Setting up libp11-kit0:amd64 (0.23.15-2) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../libunistring2_0.9.10-1ubuntu2_amd64.deb ... Unpacking libunistring2:amd64 (0.9.10-1ubuntu2) over (0.9.10-1ubuntu1) ... Setting up libunistring2:amd64 (0.9.10-1ubuntu2) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../libgnutls30_3.6.7-4ubuntu1_amd64.deb ... Unpacking libgnutls30:amd64 (3.6.7-4ubuntu1) over (3.6.4-2ubuntu2) ... Setting up libgnutls30:amd64 (3.6.7-4ubuntu1) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../systemd-sysv_240-6ubuntu9_amd64.deb ... Unpacking systemd-sysv (240-6ubuntu9) over (239-7ubuntu15) ... Preparing to unpack .../libacl1_2.2.53-4_amd64.deb ... Unpacking libacl1:amd64 (2.2.53-4) over (2.2.52-3build1) ... Setting up libacl1:amd64 (2.2.53-4) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../libapparmor1_2.13.2-9ubuntu7_amd64.deb ... Unpacking libapparmor1:amd64 (2.13.2-9ubuntu7) over (2.12-4ubuntu10) ... Preparing to unpack .../libaudit-common_1%3a2.8.4-3ubuntu1_all.deb ... Unpacking libaudit-common (1:2.8.4-3ubuntu1) over (1:2.8.3-1ubuntu3) ... Setting up libaudit-common (1:2.8.4-3ubuntu1) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../libcap-ng0_0.7.9-2_amd64.deb ... Unpacking libcap-ng0:amd64 (0.7.9-2) over (0.7.9-1build1) ... Setting up libcap-ng0:amd64 (0.7.9-2) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../libaudit1_1%3a2.8.4-3ubuntu1_amd64.deb ... Unpacking libaudit1:amd64 (1:2.8.4-3ubuntu1) over (1:2.8.3-1ubuntu3) ... Setting up libaudit1:amd64 (1:2.8.4-3ubuntu1) ... (Reading database ... 12720 files and directories currently installed.) Preparing to unpack .../libcap2_1%3a2.25-2_amd64.deb ... Unpacking libcap2:amd64 (1:2.25-2) over (1:2.25-1.2) ... Selecting previously unselected package libjson-c4:amd64. Preparing to unpack .../libjson-c4_0.13.1+dfsg-2_amd64.deb ... Unpacking libjson-c4:amd64 (0.13.1+dfsg-2) ... Preparing to unpack .../libargon2-1_0~20171227-0.2_amd64.deb ... Unpacking libargon2-1:amd64 (0~20171227-0.2) over (0~20171227-0.1) ... Preparing to unpack .../libudev1_240-6ubuntu9_amd64.deb ... Unpacking libudev1:amd64 (240-6ubuntu9) over (239-7ubuntu15) ... Setting up libudev1:amd64 (240-6ubuntu9) ... (Reading database ... 12727 files and directories currently installed.) Preparing to unpack .../libdevmapper1.02.1_2%3a1.02.155-2ubuntu4_amd64.deb ... Unpacking libdevmapper1.02.1:amd64 (2:1.02.155-2ubuntu4) over (2:1.02.145-4.1ubuntu4) ... Preparing to unpack .../libssl1.1_1.1.1c-1ubuntu3_amd64.deb ... Unpacking libssl1.1:amd64 (1.1.1c-1ubuntu3) over (1.1.1a-1ubuntu2) ... Preparing to unpack .../libcryptsetup12_2%3a2.1.0-5ubuntu2_amd64.deb ... Unpacking libcryptsetup12:amd64 (2:2.1.0-5ubuntu2) over (2:2.0.4-2ubuntu2) ... Preparing to unpack .../libgpg-error0_1.36-1_amd64.deb ... Unpacking libgpg-error0:amd64 (1.36-1) over (1.32-3) ... Setting up libgpg-error0:amd64 (1.36-1) ... (Reading database ... 12727 files and directories currently installed.) Preparing to unpack .../libidn11_1.33-2.2ubuntu2_amd64.deb ... Unpacking libidn11:amd64 (1.33-2.2ubuntu2) over (1.33-2.2ubuntu1) ... Preparing to unpack .../libkmod2_26-1ubuntu1_amd64.deb ... Unpacking libkmod2:amd64 (26-1ubuntu1) over (25-1ubuntu2) ... Preparing to unpack .../libpam0g_1.3.1-5ubuntu1_amd64.deb ... Unpacking libpam0g:amd64 (1.3.1-5ubuntu1) over (1.1.8-3.6ubuntu2) ... Setting up libpam0g:amd64 (1.3.1-5ubuntu1) ... Checking for services that may need to be restarted...Checking init scripts... Nothing to restart. (Reading database ... 12727 files and directories currently installed.) Preparing to unpack .../libseccomp2_2.4.1-0ubuntu0.19.10.3_amd64.deb ... Unpacking libseccomp2:amd64 (2.4.1-0ubuntu0.19.10.3) over (2.3.3-3ubuntu2) ... Setting up libseccomp2:amd64 (2.4.1-0ubuntu0.19.10.3) ... (Reading database ... 12727 files and directories currently installed.) Preparing to unpack .../mount_2.33.1-0.1ubuntu2_amd64.deb ... Unpacking mount (2.33.1-0.1ubuntu2) over (2.32-0.1ubuntu2) ... Preparing to unpack .../libsepol1_2.9-1_amd64.deb ... Unpacking libsepol1:amd64 (2.9-1) over (2.8-1) ... Setting up libsepol1:amd64 (2.9-1) ... (Reading database ... 12727 files and directories currently installed.) Preparing to unpack .../libsemanage-common_2.9-1_all.deb ... Unpacking libsemanage-common (2.9-1) over (2.8-1build2) ... Setting up libsemanage-common (2.9-1) ... (Reading database ... 12728 files and directories currently installed.) Preparing to unpack .../libsemanage1_2.9-1_amd64.deb ... Unpacking libsemanage1:amd64 (2.9-1) over (2.8-1build2) ... Setting up libsemanage1:amd64 (2.9-1) ... (Reading database ... 12728 files and directories currently installed.) Preparing to unpack .../libpam-modules-bin_1.3.1-5ubuntu1_amd64.deb ... Unpacking libpam-modules-bin (1.3.1-5ubuntu1) over (1.1.8-3.6ubuntu2) ... Setting up libpam-modules-bin (1.3.1-5ubuntu1) ... (Reading database ... 12728 files and directories currently installed.) Preparing to unpack .../libpam-modules_1.3.1-5ubuntu1_amd64.deb ... Unpacking libpam-modules:amd64 (1.3.1-5ubuntu1) over (1.1.8-3.6ubuntu2) ... Setting up libpam-modules:amd64 (1.3.1-5ubuntu1) ... Installing new version of config file /etc/security/access.conf ... Installing new version of config file /etc/security/limits.conf ... (Reading database ... 12728 files and directories currently installed.) Preparing to unpack .../passwd_1%3a4.5-1.1ubuntu2_amd64.deb ... Unpacking passwd (1:4.5-1.1ubuntu2) over (1:4.5-1ubuntu1) ... Setting up passwd (1:4.5-1.1ubuntu2) ... (Reading database ... 12728 files and directories currently installed.) Preparing to unpack .../adduser_3.118ubuntu1_all.deb ... Unpacking adduser (3.118ubuntu1) over (3.117ubuntu1) ... Setting up adduser (3.118ubuntu1) ... (Reading database ... 12728 files and directories currently installed.) Preparing to unpack .../systemd_240-6ubuntu9_amd64.deb ... Unpacking systemd (240-6ubuntu9) over (239-7ubuntu15) ... Preparing to unpack .../libsystemd0_240-6ubuntu9_amd64.deb ... Unpacking libsystemd0:amd64 (240-6ubuntu9) over (239-7ubuntu15) ... Setting up libsystemd0:amd64 (240-6ubuntu9) ... (Reading database ... 12744 files and directories currently installed.) Preparing to unpack .../libzstd1_1.3.8+dfsg-3_amd64.deb ... Unpacking libzstd1:amd64 (1.3.8+dfsg-3) over (1.3.5+dfsg-1ubuntu1) ... Setting up libzstd1:amd64 (1.3.8+dfsg-3) ... Selecting previously unselected package libapt-pkg5.90:amd64. (Reading database ... 12744 files and directories currently installed.) Preparing to unpack .../libapt-pkg5.90_1.9.1_amd64.deb ... Unpacking libapt-pkg5.90:amd64 (1.9.1) ... Setting up libapt-pkg5.90:amd64 (1.9.1) ... (Reading database ... 12793 files and directories currently installed.) Preparing to unpack .../libgcrypt20_1.8.4-5ubuntu1_amd64.deb ... Unpacking libgcrypt20:amd64 (1.8.4-5ubuntu1) over (1.8.4-3ubuntu1) ... Setting up libgcrypt20:amd64 (1.8.4-5ubuntu1) ... (Reading database ... 12793 files and directories currently installed.) Preparing to unpack .../gpgv_2.2.12-1ubuntu3_amd64.deb ... Unpacking gpgv (2.2.12-1ubuntu3) over (2.2.8-3ubuntu1) ... Setting up gpgv (2.2.12-1ubuntu3) ... (Reading database ... 12793 files and directories currently installed.) Preparing to unpack .../archives/apt_1.9.1_amd64.deb ... Unpacking apt (1.9.1) over (1.8.0~alpha2ubuntu1) ... Setting up apt (1.9.1) ... Installing new version of config file /etc/apt/apt.conf.d/01autoremove ... (Reading database ... 12816 files and directories currently installed.) Preparing to unpack .../libext2fs2_1.45.2-1ubuntu1_amd64.deb ... Unpacking libext2fs2:amd64 (1.45.2-1ubuntu1) over (1.44.4-2ubuntu1) ... Setting up libext2fs2:amd64 (1.45.2-1ubuntu1) ... (Reading database ... 12815 files and directories currently installed.) Preparing to unpack .../e2fsprogs_1.45.2-1ubuntu1_amd64.deb ... Unpacking e2fsprogs (1.45.2-1ubuntu1) over (1.44.4-2ubuntu1) ... Setting up libapparmor1:amd64 (2.13.2-9ubuntu7) ... Setting up libcap2:amd64 (1:2.25-2) ... Setting up libargon2-1:amd64 (0~20171227-0.2) ... Setting up libdevmapper1.02.1:amd64 (2:1.02.155-2ubuntu4) ... Setting up libjson-c4:amd64 (0.13.1+dfsg-2) ... Setting up libssl1.1:amd64 (1.1.1c-1ubuntu3) ... Setting up libcryptsetup12:amd64 (2:2.1.0-5ubuntu2) ... Setting up libidn11:amd64 (1.33-2.2ubuntu2) ... Setting up libkmod2:amd64 (26-1ubuntu1) ... Setting up mount (2.33.1-0.1ubuntu2) ... Setting up systemd (240-6ubuntu9) ... Installing new version of config file /etc/dhcp/dhclient-enter-hooks.d/resolved ... Installing new version of config file /etc/systemd/journald.conf ... Installing new version of config file /etc/systemd/resolved.conf ... Installing new version of config file /etc/systemd/system.conf ... Setting up systemd-sysv (240-6ubuntu9) ... (Reading database ... 12831 files and directories currently installed.) Preparing to unpack .../archives/init_1.57_amd64.deb ... Unpacking init (1.57) over (1.56) ... Preparing to unpack .../libattr1_1%3a2.4.48-4_amd64.deb ... Unpacking libattr1:amd64 (1:2.4.48-4) over (1:2.4.47-2build1) ... Setting up libattr1:amd64 (1:2.4.48-4) ... (Reading database ... 12832 files and directories currently installed.) Preparing to unpack .../libpam-runtime_1.3.1-5ubuntu1_all.deb ... Unpacking libpam-runtime (1.3.1-5ubuntu1) over (1.1.8-3.6ubuntu2) ... Setting up libpam-runtime (1.3.1-5ubuntu1) ... (Reading database ... 12832 files and directories currently installed.) Preparing to unpack .../libpcre3_2%3a8.39-12_amd64.deb ... Unpacking libpcre3:amd64 (2:8.39-12) over (2:8.39-11) ... Setting up libpcre3:amd64 (2:8.39-12) ... (Reading database ... 12832 files and directories currently installed.) Preparing to unpack .../00-libcom-err2_1.45.2-1ubuntu1_amd64.deb ... Unpacking libcom-err2:amd64 (1.45.2-1ubuntu1) over (1.44.4-2ubuntu1) ... Preparing to unpack .../01-libprocps7_2%3a3.3.15-2ubuntu2_amd64.deb ... Unpacking libprocps7:amd64 (2:3.3.15-2ubuntu2) over (2:3.3.15-2ubuntu1) ... Preparing to unpack .../02-libss2_1.45.2-1ubuntu1_amd64.deb ... Unpacking libss2:amd64 (1.45.2-1ubuntu1) over (1.44.4-2ubuntu1) ... Preparing to unpack .../03-procps_2%3a3.3.15-2ubuntu2_amd64.deb ... Unpacking procps (2:3.3.15-2ubuntu2) over (2:3.3.15-2ubuntu1) ... Preparing to unpack .../04-openssl_1.1.1c-1ubuntu3_amd64.deb ... Unpacking openssl (1.1.1c-1ubuntu3) over (1.1.1a-1ubuntu2) ... Preparing to unpack .../05-ca-certificates_20190110_all.deb ... Unpacking ca-certificates (20190110) over (20180409) ... Preparing to unpack .../06-dmsetup_2%3a1.02.155-2ubuntu4_amd64.deb ... Unpacking dmsetup (2:1.02.155-2ubuntu4) over (2:1.02.145-4.1ubuntu4) ... Preparing to unpack .../07-libjson-c3_0.12.1+ds-2_amd64.deb ... Unpacking libjson-c3:amd64 (0.12.1+ds-2) over (0.12.1-1.3) ... Preparing to unpack .../08-readline-common_8.0-1_all.deb ... Unpacking readline-common (8.0-1) over (7.0-5) ... Selecting previously unselected package libreadline8:amd64. Preparing to unpack .../09-libreadline8_8.0-1_amd64.deb ... Unpacking libreadline8:amd64 (8.0-1) ... Preparing to unpack .../10-libslang2_2.3.2-3_amd64.deb ... Unpacking libslang2:amd64 (2.3.2-3) over (2.3.2-1ubuntu1) ... Preparing to unpack .../11-libsqlite3-0_3.27.2-3_amd64.deb ... Unpacking libsqlite3-0:amd64 (3.27.2-3) over (3.26.0-2) ... Preparing to unpack .../12-tzdata_2019a-1_all.deb ... Unpacking tzdata (2019a-1) over (2018g-1) ... Preparing to unpack .../13-xz-utils_5.2.4-1_amd64.deb ... Unpacking xz-utils (5.2.4-1) over (5.2.2-1.3) ... Preparing to unpack .../14-libpng16-16_1.6.37-1_amd64.deb ... Unpacking libpng16-16:amd64 (1.6.37-1) over (1.6.34-2) ... Preparing to unpack .../15-multiarch-support_2.29-0ubuntu2_amd64.deb ... Unpacking multiarch-support (2.29-0ubuntu2) over (2.28-0ubuntu1) ... Preparing to unpack .../16-advancecomp_2.1-2.1_amd64.deb ... Unpacking advancecomp (2.1-2.1) over (2.1-1) ... Preparing to unpack .../17-binutils-x86-64-linux-gnu_2.32.51.20190702-1ubuntu1_amd64.deb ... Unpacking binutils-x86-64-linux-gnu (2.32.51.20190702-1ubuntu1) over (2.31.1-10ubuntu1) ... Preparing to unpack .../18-libbinutils_2.32.51.20190702-1ubuntu1_amd64.deb ... Unpacking libbinutils:amd64 (2.32.51.20190702-1ubuntu1) over (2.31.1-10ubuntu1) ... Preparing to unpack .../19-binutils_2.32.51.20190702-1ubuntu1_amd64.deb ... Unpacking binutils (2.32.51.20190702-1ubuntu1) over (2.31.1-10ubuntu1) ... Preparing to unpack .../20-binutils-common_2.32.51.20190702-1ubuntu1_amd64.deb ... Unpacking binutils-common:amd64 (2.32.51.20190702-1ubuntu1) over (2.31.1-10ubuntu1) ... Preparing to unpack .../21-libubsan1_9.1.0-5ubuntu1_amd64.deb ... Unpacking libubsan1:amd64 (9.1.0-5ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../22-libtsan0_9.1.0-5ubuntu1_amd64.deb ... Unpacking libtsan0:amd64 (9.1.0-5ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../23-libgomp1_9.1.0-5ubuntu1_amd64.deb ... Unpacking libgomp1:amd64 (9.1.0-5ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../24-libitm1_9.1.0-5ubuntu1_amd64.deb ... Unpacking libitm1:amd64 (9.1.0-5ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../25-libatomic1_9.1.0-5ubuntu1_amd64.deb ... Unpacking libatomic1:amd64 (9.1.0-5ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../26-libasan5_9.1.0-5ubuntu1_amd64.deb ... Unpacking libasan5:amd64 (9.1.0-5ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../27-liblsan0_9.1.0-5ubuntu1_amd64.deb ... Unpacking liblsan0:amd64 (9.1.0-5ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../28-libmpx2_8.3.0-16ubuntu3_amd64.deb ... Unpacking libmpx2:amd64 (8.3.0-16ubuntu3) over (8.2.0-12ubuntu1) ... Preparing to unpack .../29-libquadmath0_9.1.0-5ubuntu1_amd64.deb ... Unpacking libquadmath0:amd64 (9.1.0-5ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../30-g++-8_8.3.0-16ubuntu3_amd64.deb ... Unpacking g++-8 (8.3.0-16ubuntu3) over (8.2.0-12ubuntu1) ... Preparing to unpack .../31-libstdc++-8-dev_8.3.0-16ubuntu3_amd64.deb ... Unpacking libstdc++-8-dev:amd64 (8.3.0-16ubuntu3) over (8.2.0-12ubuntu1) ... Preparing to unpack .../32-gcc-8_8.3.0-16ubuntu3_amd64.deb ... Unpacking gcc-8 (8.3.0-16ubuntu3) over (8.2.0-12ubuntu1) ... Preparing to unpack .../33-libgcc-8-dev_8.3.0-16ubuntu3_amd64.deb ... Unpacking libgcc-8-dev:amd64 (8.3.0-16ubuntu3) over (8.2.0-12ubuntu1) ... Preparing to unpack .../34-libcc1-0_9.1.0-5ubuntu1_amd64.deb ... Unpacking libcc1-0:amd64 (9.1.0-5ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../35-cpp-8_8.3.0-16ubuntu3_amd64.deb ... Unpacking cpp-8 (8.3.0-16ubuntu3) over (8.2.0-12ubuntu1) ... Preparing to unpack .../36-gcc-8-base_8.3.0-16ubuntu3_amd64.deb ... Unpacking gcc-8-base:amd64 (8.3.0-16ubuntu3) over (8.2.0-12ubuntu1) ... Selecting previously unselected package libisl21:amd64. Preparing to unpack .../37-libisl21_0.21-1_amd64.deb ... Unpacking libisl21:amd64 (0.21-1) ... Preparing to unpack .../38-libmpfr6_4.0.2-1_amd64.deb ... Unpacking libmpfr6:amd64 (4.0.2-1) over (4.0.1-2) ... Preparing to unpack .../39-g++_4%3a8.3.0-1ubuntu3_amd64.deb ... Unpacking g++ (4:8.3.0-1ubuntu3) over (4:8.2.0-2ubuntu2) ... Preparing to unpack .../40-gcc_4%3a8.3.0-1ubuntu3_amd64.deb ... Unpacking gcc (4:8.3.0-1ubuntu3) over (4:8.2.0-2ubuntu2) ... Preparing to unpack .../41-cpp_4%3a8.3.0-1ubuntu3_amd64.deb ... Unpacking cpp (4:8.3.0-1ubuntu3) over (4:8.2.0-2ubuntu2) ... Preparing to unpack .../42-dpkg-dev_1.19.6ubuntu1_all.deb ... Unpacking dpkg-dev (1.19.6ubuntu1) over (1.19.2ubuntu1) ... Preparing to unpack .../43-libdpkg-perl_1.19.6ubuntu1_all.deb ... Unpacking libdpkg-perl (1.19.6ubuntu1) over (1.19.2ubuntu1) ... Preparing to unpack .../44-patch_2.7.6-4_amd64.deb ... Unpacking patch (2.7.6-4) over (2.7.6-3) ... Preparing to unpack .../45-build-essential_12.6ubuntu1_amd64.deb ... Unpacking build-essential (12.6ubuntu1) over (12.5ubuntu2) ... Preparing to unpack .../46-e2fslibs_1.45.2-1ubuntu1_amd64.deb ... Unpacking e2fslibs:amd64 (1.45.2-1ubuntu1) over (1.44.4-2ubuntu1) ... Preparing to unpack .../47-libassuan0_2.5.3-1_amd64.deb ... Unpacking libassuan0:amd64 (2.5.3-1) over (2.5.1-2) ... Preparing to unpack .../48-pinentry-curses_1.1.0-2_amd64.deb ... Unpacking pinentry-curses (1.1.0-2) over (1.1.0-1build2) ... Preparing to unpack .../49-gpg_2.2.12-1ubuntu3_amd64.deb ... Unpacking gpg (2.2.12-1ubuntu3) over (2.2.8-3ubuntu1) ... Preparing to unpack .../50-gpgconf_2.2.12-1ubuntu3_amd64.deb ... Unpacking gpgconf (2.2.12-1ubuntu3) over (2.2.8-3ubuntu1) ... Preparing to unpack .../51-gpg-agent_2.2.12-1ubuntu3_amd64.deb ... Unpacking gpg-agent (2.2.12-1ubuntu3) over (2.2.8-3ubuntu1) ... Preparing to unpack .../52-libcomerr2_1.45.2-1ubuntu1_amd64.deb ... Unpacking libcomerr2:amd64 (1.45.2-1ubuntu1) over (1.44.4-2ubuntu1) ... Preparing to unpack .../53-optipng_0.7.7-1_amd64.deb ... Unpacking optipng (0.7.7-1) over (0.7.6-1.1) ... Preparing to unpack .../54-pkgbinarymangler_144_all.deb ... Unpacking pkgbinarymangler (144) over (143) ... Setting up perl-modules-5.28 (5.28.1-6) ... Setting up libisl21:amd64 (0.21-1) ... Setting up lsb-base (10.2019051400ubuntu1) ... Setting up libjson-c3:amd64 (0.12.1+ds-2) ... Setting up e2fslibs:amd64 (1.45.2-1ubuntu1) ... Setting up init (1.57) ... Setting up libprocps7:amd64 (2:3.3.15-2ubuntu2) ... Setting up libsqlite3-0:amd64 (3.27.2-3) ... Setting up binutils-common:amd64 (2.32.51.20190702-1ubuntu1) ... Setting up linux-libc-dev:amd64 (5.0.0-20.21) ... Setting up libcom-err2:amd64 (1.45.2-1ubuntu1) ... Setting up libassuan0:amd64 (2.5.3-1) ... Setting up libgomp1:amd64 (9.1.0-5ubuntu1) ... Setting up bzip2 (1.0.6-9.1) ... Setting up tzdata (2019a-1) ... Current default time zone: 'Etc/UTC' Local time is now: Wed Jul 3 20:34:25 UTC 2019. Universal Time is now: Wed Jul 3 20:34:25 UTC 2019. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up libasan5:amd64 (9.1.0-5ubuntu1) ... Setting up libslang2:amd64 (2.3.2-3) ... Setting up multiarch-support (2.29-0ubuntu2) ... Setting up libmpfr6:amd64 (4.0.2-1) ... Setting up libncurses6:amd64 (6.1+20181013-2ubuntu2) ... Setting up xz-utils (5.2.4-1) ... Setting up libquadmath0:amd64 (9.1.0-5ubuntu1) ... Setting up libpng16-16:amd64 (1.6.37-1) ... Setting up libatomic1:amd64 (9.1.0-5ubuntu1) ... Setting up patch (2.7.6-4) ... Setting up libss2:amd64 (1.45.2-1ubuntu1) ... Setting up gcc-8-base:amd64 (8.3.0-16ubuntu3) ... Setting up libmpx2:amd64 (8.3.0-16ubuntu3) ... Setting up libubsan1:amd64 (9.1.0-5ubuntu1) ... Setting up advancecomp (2.1-2.1) ... Setting up dmsetup (2:1.02.155-2ubuntu4) ... Setting up libcomerr2:amd64 (1.45.2-1ubuntu1) ... Setting up procps (2:3.3.15-2ubuntu2) ... Installing new version of config file /etc/sysctl.d/10-network-security.conf ... Setting up libbinutils:amd64 (2.32.51.20190702-1ubuntu1) ... Setting up cpp-8 (8.3.0-16ubuntu3) ... Setting up libc-dev-bin (2.29-0ubuntu2) ... Setting up openssl (1.1.1c-1ubuntu3) ... Installing new version of config file /etc/ssl/openssl.cnf ... Setting up readline-common (8.0-1) ... Setting up libcc1-0:amd64 (9.1.0-5ubuntu1) ... Setting up liblsan0:amd64 (9.1.0-5ubuntu1) ... Setting up libitm1:amd64 (9.1.0-5ubuntu1) ... Setting up libgdbm6:amd64 (1.18.1-4) ... Setting up binutils-x86-64-linux-gnu (2.32.51.20190702-1ubuntu1) ... Setting up libtsan0:amd64 (9.1.0-5ubuntu1) ... Setting up pinentry-curses (1.1.0-2) ... Setting up libreadline8:amd64 (8.0-1) ... Setting up e2fsprogs (1.45.2-1ubuntu1) ... Installing new version of config file /etc/mke2fs.conf ... Created symlink /etc/systemd/system/timers.target.wants/e2scrub_all.timer -> /lib/systemd/system/e2scrub_all.timer. Created symlink /etc/systemd/system/default.target.wants/e2scrub_reap.service -> /lib/systemd/system/e2scrub_reap.service. Setting up binutils (2.32.51.20190702-1ubuntu1) ... Setting up ca-certificates (20190110) ... Updating certificates in /etc/ssl/certs... 2 added, 7 removed; done. Setting up optipng (0.7.7-1) ... Setting up libgdbm-compat4:amd64 (1.18.1-4) ... Setting up libgcc-8-dev:amd64 (8.3.0-16ubuntu3) ... Setting up libperl5.28:amd64 (5.28.1-6) ... Setting up cpp (4:8.3.0-1ubuntu3) ... Setting up gpgconf (2.2.12-1ubuntu3) ... Setting up libc6-dev:amd64 (2.29-0ubuntu2) ... Setting up gpg (2.2.12-1ubuntu3) ... Setting up libstdc++-8-dev:amd64 (8.3.0-16ubuntu3) ... Setting up gcc-8 (8.3.0-16ubuntu3) ... Setting up gpg-agent (2.2.12-1ubuntu3) ... Setting up pkgbinarymangler (144) ... Setting up gcc (4:8.3.0-1ubuntu3) ... Setting up perl (5.28.1-6) ... Setting up libdpkg-perl (1.19.6ubuntu1) ... Setting up g++-8 (8.3.0-16ubuntu3) ... Setting up dpkg-dev (1.19.6ubuntu1) ... Setting up g++ (4:8.3.0-1ubuntu3) ... Setting up build-essential (12.6ubuntu1) ... Processing triggers for systemd (240-6ubuntu9) ... Processing triggers for libc-bin (2.29-0ubuntu2) ... Processing triggers for ca-certificates (20190110) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. RUN: /usr/share/launchpad-buildd/bin/sbuild-package PACKAGEBUILD-17190682 amd64 eoan-proposed -c chroot:build-PACKAGEBUILD-17190682 --arch=amd64 --dist=eoan-proposed --nolog -A sphinx_1.8.5-1ubuntu2.dsc Initiating build PACKAGEBUILD-17190682 with 4 jobs across 4 processor cores. Kernel reported to sbuild: 4.4.0-154-generic #181-Ubuntu SMP Tue Jun 25 05:29:03 UTC 2019 x86_64 sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on lcy01-amd64-026.buildd +==============================================================================+ | sphinx 1.8.5-1ubuntu2 (amd64) 03 Jul 2019 20:34 | +==============================================================================+ Package: sphinx Version: 1.8.5-1ubuntu2 Source Version: 1.8.5-1ubuntu2 Distribution: eoan-proposed Machine Architecture: amd64 Host Architecture: amd64 Build Architecture: amd64 I: NOTICE: Log filtering will replace 'build/sphinx-4XqbH3/sphinx-1.8.5' with '<>' I: NOTICE: Log filtering will replace 'build/sphinx-4XqbH3' with '<>' I: NOTICE: Log filtering will replace 'home/buildd/build-PACKAGEBUILD-17190682/chroot-autobuild' with '<>' +------------------------------------------------------------------------------+ | Fetch source files | +------------------------------------------------------------------------------+ Local sources ------------- sphinx_1.8.5-1ubuntu2.dsc exists in .; copying to chroot Check architectures ------------------- Check dependencies ------------------ Merged Build-Depends: build-essential, fakeroot Filtered Build-Depends: build-essential, fakeroot dpkg-deb: building package 'sbuild-build-depends-core-dummy' in '/<>/resolver-3aGGzD/apt_archive/sbuild-build-depends-core-dummy.deb'. Ign:1 copy:/<>/resolver-3aGGzD/apt_archive ./ InRelease Get:2 copy:/<>/resolver-3aGGzD/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-3aGGzD/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-3aGGzD/apt_archive ./ Sources [214 B] Get:5 copy:/<>/resolver-3aGGzD/apt_archive ./ Packages [524 B] Fetched 2857 B in 0s (0 B/s) Reading package lists... Reading package lists... +------------------------------------------------------------------------------+ | Install core build dependencies (apt-based resolver) | +------------------------------------------------------------------------------+ Installing build dependencies Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: libapt-pkg5.0 libisl19 libjson-c3 libreadline7 Use 'apt autoremove' to remove them. The following NEW packages will be installed: sbuild-build-depends-core-dummy 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 852 B of archives. After this operation, 0 B of additional disk space will be used. Get:1 copy:/<>/resolver-3aGGzD/apt_archive ./ sbuild-build-depends-core-dummy 0.invalid.0 [852 B] debconf: delaying package configuration, since apt-utils is not installed Fetched 852 B in 0s (0 B/s) Selecting previously unselected package sbuild-build-depends-core-dummy. (Reading database ... 12884 files and directories currently installed.) Preparing to unpack .../sbuild-build-depends-core-dummy_0.invalid.0_amd64.deb ... Unpacking sbuild-build-depends-core-dummy (0.invalid.0) ... Setting up sbuild-build-depends-core-dummy (0.invalid.0) ... Merged Build-Depends: debhelper (>= 11), dh-python (>= 3.20180313~), dpkg-dev (>= 1.17.14), dvipng, graphviz, imagemagick-6.q16, libjs-jquery (>= 1.4), libjs-underscore, librsvg2-bin, perl, python-alabaster (>= 0.7), python-all (>= 2.6.6-4~), python-babel (>= 1.3), python-docutils (>= 0.11), python-enum34, python-html5lib, python-imagesize, python-jinja2 (>= 2.3), python-mock, python-packaging, python-pygments (>= 2.1.1), python-pytest, python-requests (>= 2.4.0), python-setuptools (>= 0.6c5-1~), python-six (>= 1.5), python-stemmer, python-typing, python3-alabaster (>= 0.7), python3-all (>= 3.3.3-1~), python3-babel (>= 1.3), python3-docutils (>= 0.11), python3-html5lib, python3-imagesize, python3-jinja2 (>= 2.3), python3-lib2to3, python3-mock, python3-packaging, python3-pygments (>= 2.1.1), python3-pytest, python3-requests (>= 2.4.0), python3-setuptools, python3-six (>= 1.5), python3-sphinxcontrib.websupport, python3-stemmer, texinfo, texlive-fonts-recommended, texlive-latex-extra, texlive-latex-recommended, texlive-luatex, texlive-xetex Filtered Build-Depends: debhelper (>= 11), dh-python (>= 3.20180313~), dpkg-dev (>= 1.17.14), dvipng, graphviz, imagemagick-6.q16, libjs-jquery (>= 1.4), libjs-underscore, librsvg2-bin, perl, python-alabaster (>= 0.7), python-all (>= 2.6.6-4~), python-babel (>= 1.3), python-docutils (>= 0.11), python-enum34, python-html5lib, python-imagesize, python-jinja2 (>= 2.3), python-mock, python-packaging, python-pygments (>= 2.1.1), python-pytest, python-requests (>= 2.4.0), python-setuptools (>= 0.6c5-1~), python-six (>= 1.5), python-stemmer, python-typing, python3-alabaster (>= 0.7), python3-all (>= 3.3.3-1~), python3-babel (>= 1.3), python3-docutils (>= 0.11), python3-html5lib, python3-imagesize, python3-jinja2 (>= 2.3), python3-lib2to3, python3-mock, python3-packaging, python3-pygments (>= 2.1.1), python3-pytest, python3-requests (>= 2.4.0), python3-setuptools, python3-six (>= 1.5), python3-sphinxcontrib.websupport, python3-stemmer, texinfo, texlive-fonts-recommended, texlive-latex-extra, texlive-latex-recommended, texlive-luatex, texlive-xetex dpkg-deb: building package 'sbuild-build-depends-sphinx-dummy' in '/<>/resolver-tH43xA/apt_archive/sbuild-build-depends-sphinx-dummy.deb'. Ign:1 copy:/<>/resolver-tH43xA/apt_archive ./ InRelease Get:2 copy:/<>/resolver-tH43xA/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-tH43xA/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-tH43xA/apt_archive ./ Sources [580 B] Get:5 copy:/<>/resolver-tH43xA/apt_archive ./ Packages [890 B] Fetched 3589 B in 0s (0 B/s) Reading package lists... Reading package lists... +------------------------------------------------------------------------------+ | Install sphinx build dependencies (apt-based resolver) | +------------------------------------------------------------------------------+ Installing build dependencies Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: libapt-pkg5.0 libisl19 libjson-c3 libreadline7 Use 'apt autoremove' to remove them. The following additional packages will be installed: adwaita-icon-theme autoconf automake autopoint autotools-dev bsdmainutils dbus dbus-user-session dconf-gsettings-backend dconf-service debhelper dh-autoreconf dh-python dh-strip-nondeterminism docutils-common dvipng dwz file fontconfig fontconfig-config fonts-dejavu-core fonts-lmodern gettext gettext-base ghostscript glib-networking glib-networking-common glib-networking-services graphviz groff-base gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme humanity-icon-theme imagemagick-6-common imagemagick-6.q16 intltool-debian libarchive-zip-perl libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libbrotli1 libbsd0 libcairo-gobject2 libcairo2 libcdt5 libcgraph6 libcolord2 libcroco3 libcups2 libcupsimage2 libdatrie1 libdbus-1-3 libdconf1 libelf1 libepoxy0 libexpat1 libfftw3-double3 libfile-stripnondeterminism-perl libfontconfig1 libfreetype6 libfribidi0 libgd3 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libglib2.0-0 libgraphite2-3 libgs9 libgs9-common libgssapi-krb5-2 libgtk-3-0 libgtk-3-common libgts-0.7-5 libgvc6 libgvpr2 libharfbuzz-icu0 libharfbuzz0b libice6 libicu63 libijs-0.35 libjbig0 libjbig2dec0 libjpeg-turbo8 libjpeg8 libjs-jquery libjs-sphinxdoc libjs-underscore libjson-glib-1.0-0 libjson-glib-1.0-common libk5crypto3 libkeyutils1 libkpathsea6 libkrb5-3 libkrb5support0 liblab-gamut1 liblcms2-2 liblqr-1-0 libltdl7 libmagic-mgc libmagic1 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmpdec2 libpam-systemd libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper1 libpathplan4 libpipeline1 libpixman-1-0 libpotrace0 libproxy1v5 libpsl5 libptexenc1 libpython-stdlib libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib librest-0.7-0 librsvg2-2 librsvg2-bin librsvg2-common libsigsegv2 libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libstemmer0d libsynctex2 libteckit0 libtexlua52 libtexlua53 libtexluajit2 libtext-unidecode-perl libthai-data libthai0 libtiff5 libtool libuchardet0 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwebp6 libwebpmux3 libwoff1 libx11-6 libx11-data libxau6 libxaw7 libxcb-render0 libxcb-shm0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxml2 libxmu6 libxpm4 libxrandr2 libxrender1 libxt6 libxxhash0 libzzip-0-13 m4 man-db mime-support po-debconf poppler-data preview-latex-style python python-alabaster python-all python-atomicwrites python-attr python-babel python-babel-localedata python-certifi python-chardet python-docutils python-enum34 python-funcsigs python-html5lib python-idna python-imagesize python-jinja2 python-markupsafe python-minimal python-mock python-more-itertools python-packaging python-pathlib2 python-pbr python-pkg-resources python-pluggy python-py python-pygments python-pyparsing python-pytest python-requests python-roman python-scandir python-setuptools python-six python-stemmer python-typing python-tz python-urllib3 python-webencodings python2 python2-minimal python2.7 python2.7-minimal python3 python3-alabaster python3-all python3-atomicwrites python3-attr python3-babel python3-certifi python3-chardet python3-distutils python3-docutils python3-html5lib python3-idna python3-imagesize python3-jinja2 python3-lib2to3 python3-markupsafe python3-minimal python3-mock python3-more-itertools python3-packaging python3-pbr python3-pkg-resources python3-pluggy python3-py python3-pygments python3-pyparsing python3-pytest python3-requests python3-roman python3-setuptools python3-six python3-sphinx python3-sphinxcontrib.websupport python3-stemmer python3-tz python3-urllib3 python3-webencodings python3.7 python3.7-minimal sgml-base shared-mime-info sphinx-common t1utils teckit tex-common texinfo texlive-base texlive-binaries texlive-fonts-recommended texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-luatex texlive-pictures texlive-xetex tipa ubuntu-mono ucf x11-common xdg-utils xkb-data xml-core Suggested packages: autoconf-archive gnu-standards autoconf-doc wamerican | wordlist whois vacation dh-make gettext-doc libasprintf-dev libgettextpo-dev ghostscript-x gsfonts graphviz-doc groff imagemagick-doc autotrace cups-bsd | lpr | lprng curl enscript ffmpeg gimp gnuplot grads hp2xx html2ps libwmf-bin mplayer povray radiance sane-utils transfig ufraw-batch colord cups-common libfftw3-bin libfftw3-dev libgd-tools krb5-doc krb5-user gvfs liblcms2-utils libmagickcore-6.q16-6-extra libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc apparmor less www-browser libmail-box-perl poppler-utils fonts-japanese-mincho | fonts-ipafont-mincho fonts-japanese-gothic | fonts-ipafont-gothic fonts-arphic-ukai fonts-arphic-uming fonts-nanum python-doc python-tk python-sphinx python-attr-doc fonts-linuxlibertine | ttf-linux-libertine texlive-lang-french python-enum34-doc python-funcsigs-doc python-genshi python-lxml python-jinja2-doc python-mock-doc subversion python-pytest-xdist python-pygments-doc ttf-bitstream-vera python-pyparsing-doc python-cryptography python-openssl python-socks python-setuptools-doc python-stemmer-doc python-ntlm python2-doc python2.7-doc binfmt-support python3-doc python3-tk python3-venv docutils-doc python3-genshi python3-lxml python3-cryptography python3-openssl python3-socks latexmk libjs-mathjax python3-sphinx-rtd-theme sphinx-doc texlive-generic-extra python3.7-venv python3.7-doc sgml-base-doc texlive-generic-recommended texinfo-doc-nonfree perl-tk xpdf-reader | pdf-viewer texlive-fonts-recommended-doc texlive-latex-base-doc icc-profiles libfile-which-perl libspreadsheet-parseexcel-perl texlive-latex-extra-doc texlive-latex-recommended-doc texlive-pstricks dot2tex prerex ruby-tcltk | libtcltk-ruby texlive-pictures-doc vprerex Recommended packages: curl | wget | lynx gsfonts fonts-liberation libmagickcore-6.q16-6-extra netpbm at-spi2-core libcupsfilters1 libarchive-cpio-perl libgdk-pixbuf2.0-bin libglib2.0-data xdg-user-dirs fonts-droid-fallback libgtk-3-bin libgts-bin javascript-common krb5-locales publicsuffix libltdl-dev libwww-perl libxml-sax-expat-perl libmail-sendmail-perl docutils-doc python-pil python-cryptography python-ipaddress python-openssl python3-pil python3-sqlalchemy python3-whoosh python3-xapian lmodern tex-gyre texlive-plain-generic ruby | ruby-interpreter tk libfile-mimeinfo-perl libnet-dbus-perl libx11-protocol-perl x11-utils x11-xserver-utils The following NEW packages will be installed: adwaita-icon-theme autoconf automake autopoint autotools-dev bsdmainutils dbus dbus-user-session dconf-gsettings-backend dconf-service debhelper dh-autoreconf dh-python dh-strip-nondeterminism docutils-common dvipng dwz file fontconfig fontconfig-config fonts-dejavu-core fonts-lmodern gettext gettext-base ghostscript glib-networking glib-networking-common glib-networking-services graphviz groff-base gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme humanity-icon-theme imagemagick-6-common imagemagick-6.q16 intltool-debian libarchive-zip-perl libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libbrotli1 libbsd0 libcairo-gobject2 libcairo2 libcdt5 libcgraph6 libcolord2 libcroco3 libcups2 libcupsimage2 libdatrie1 libdbus-1-3 libdconf1 libelf1 libepoxy0 libexpat1 libfftw3-double3 libfile-stripnondeterminism-perl libfontconfig1 libfreetype6 libfribidi0 libgd3 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libglib2.0-0 libgraphite2-3 libgs9 libgs9-common libgssapi-krb5-2 libgtk-3-0 libgtk-3-common libgts-0.7-5 libgvc6 libgvpr2 libharfbuzz-icu0 libharfbuzz0b libice6 libicu63 libijs-0.35 libjbig0 libjbig2dec0 libjpeg-turbo8 libjpeg8 libjs-jquery libjs-sphinxdoc libjs-underscore libjson-glib-1.0-0 libjson-glib-1.0-common libk5crypto3 libkeyutils1 libkpathsea6 libkrb5-3 libkrb5support0 liblab-gamut1 liblcms2-2 liblqr-1-0 libltdl7 libmagic-mgc libmagic1 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmpdec2 libpam-systemd libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper1 libpathplan4 libpipeline1 libpixman-1-0 libpotrace0 libproxy1v5 libpsl5 libptexenc1 libpython-stdlib libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib librest-0.7-0 librsvg2-2 librsvg2-bin librsvg2-common libsigsegv2 libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libstemmer0d libsynctex2 libteckit0 libtexlua52 libtexlua53 libtexluajit2 libtext-unidecode-perl libthai-data libthai0 libtiff5 libtool libuchardet0 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwebp6 libwebpmux3 libwoff1 libx11-6 libx11-data libxau6 libxaw7 libxcb-render0 libxcb-shm0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxml2 libxmu6 libxpm4 libxrandr2 libxrender1 libxt6 libxxhash0 libzzip-0-13 m4 man-db mime-support po-debconf poppler-data preview-latex-style python python-alabaster python-all python-atomicwrites python-attr python-babel python-babel-localedata python-certifi python-chardet python-docutils python-enum34 python-funcsigs python-html5lib python-idna python-imagesize python-jinja2 python-markupsafe python-minimal python-mock python-more-itertools python-packaging python-pathlib2 python-pbr python-pkg-resources python-pluggy python-py python-pygments python-pyparsing python-pytest python-requests python-roman python-scandir python-setuptools python-six python-stemmer python-typing python-tz python-urllib3 python-webencodings python2 python2-minimal python2.7 python2.7-minimal python3 python3-alabaster python3-all python3-atomicwrites python3-attr python3-babel python3-certifi python3-chardet python3-distutils python3-docutils python3-html5lib python3-idna python3-imagesize python3-jinja2 python3-lib2to3 python3-markupsafe python3-minimal python3-mock python3-more-itertools python3-packaging python3-pbr python3-pkg-resources python3-pluggy python3-py python3-pygments python3-pyparsing python3-pytest python3-requests python3-roman python3-setuptools python3-six python3-sphinx python3-sphinxcontrib.websupport python3-stemmer python3-tz python3-urllib3 python3-webencodings python3.7 python3.7-minimal sbuild-build-depends-sphinx-dummy sgml-base shared-mime-info sphinx-common t1utils teckit tex-common texinfo texlive-base texlive-binaries texlive-fonts-recommended texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-luatex texlive-pictures texlive-xetex tipa ubuntu-mono ucf x11-common xdg-utils xkb-data xml-core 0 upgraded, 293 newly installed, 0 to remove and 0 not upgraded. Need to get 175 MB of archives. After this operation, 642 MB of additional disk space will be used. Get:1 copy:/<>/resolver-tH43xA/apt_archive ./ sbuild-build-depends-sphinx-dummy 0.invalid.0 [1220 B] Get:2 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libpython3.7-minimal amd64 3.7.4~rc2-1 [545 kB] Get:3 http://ftpmaster.internal/ubuntu eoan/main amd64 libexpat1 amd64 2.2.6-2 [88.8 kB] Get:4 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 python3.7-minimal amd64 3.7.4~rc2-1 [1690 kB] Get:5 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-minimal amd64 3.7.3-1 [23.4 kB] Get:6 http://ftpmaster.internal/ubuntu eoan/main amd64 mime-support all 3.62ubuntu1 [30.6 kB] Get:7 http://ftpmaster.internal/ubuntu eoan/main amd64 libmpdec2 amd64 2.4.2-2 [84.1 kB] Get:8 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 libpython3.7-stdlib amd64 3.7.4~rc2-1 [1739 kB] Get:9 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 python3.7 amd64 3.7.4~rc2-1 [293 kB] Get:10 http://ftpmaster.internal/ubuntu eoan/main amd64 libpython3-stdlib amd64 3.7.3-1 [6976 B] Get:11 http://ftpmaster.internal/ubuntu eoan/main amd64 python3 amd64 3.7.3-1 [47.2 kB] Get:12 http://ftpmaster.internal/ubuntu eoan/main amd64 libxau6 amd64 1:1.0.8-1 [8376 B] Get:13 http://ftpmaster.internal/ubuntu eoan/main amd64 libbsd0 amd64 0.9.1-2 [44.4 kB] Get:14 http://ftpmaster.internal/ubuntu eoan/main amd64 libxdmcp6 amd64 1:1.1.2-3 [10.7 kB] Get:15 http://ftpmaster.internal/ubuntu eoan/main amd64 libxcb1 amd64 1.13.1-2 [45.2 kB] Get:16 http://ftpmaster.internal/ubuntu eoan/main amd64 libx11-data all 2:1.6.7-1 [113 kB] Get:17 http://ftpmaster.internal/ubuntu eoan/main amd64 libx11-6 amd64 2:1.6.7-1 [572 kB] Get:18 http://ftpmaster.internal/ubuntu eoan/main amd64 libxext6 amd64 2:1.3.3-1 [29.4 kB] Get:19 http://ftpmaster.internal/ubuntu eoan/main amd64 bsdmainutils amd64 11.1.2ubuntu2 [181 kB] Get:20 http://ftpmaster.internal/ubuntu eoan/main amd64 libuchardet0 amd64 0.0.6-3 [64.9 kB] Get:21 http://ftpmaster.internal/ubuntu eoan/main amd64 groff-base amd64 1.22.4-3 [862 kB] Get:22 http://ftpmaster.internal/ubuntu eoan/main amd64 libpipeline1 amd64 1.5.1-2 [25.9 kB] Get:23 http://ftpmaster.internal/ubuntu eoan/main amd64 man-db amd64 2.8.5-2 [1102 kB] Get:24 http://ftpmaster.internal/ubuntu eoan/main amd64 libfftw3-double3 amd64 3.3.8-2 [727 kB] Get:25 http://ftpmaster.internal/ubuntu eoan/main amd64 libfreetype6 amd64 2.9.1-3 [335 kB] Get:26 http://ftpmaster.internal/ubuntu eoan/main amd64 ucf all 3.0038+nmu1 [51.6 kB] Get:27 http://ftpmaster.internal/ubuntu eoan/main amd64 fonts-dejavu-core all 2.37-1 [1041 kB] Get:28 http://ftpmaster.internal/ubuntu eoan/main amd64 fontconfig-config all 2.13.1-2ubuntu2 [28.9 kB] Get:29 http://ftpmaster.internal/ubuntu eoan/main amd64 libfontconfig1 amd64 2.13.1-2ubuntu2 [114 kB] Get:30 http://ftpmaster.internal/ubuntu eoan/main amd64 libjbig0 amd64 2.1-3.1build1 [26.7 kB] Get:31 http://ftpmaster.internal/ubuntu eoan/main amd64 libjpeg-turbo8 amd64 2.0.1-0ubuntu2 [117 kB] Get:32 http://ftpmaster.internal/ubuntu eoan/main amd64 libjpeg8 amd64 8c-2ubuntu8 [2194 B] Get:33 http://ftpmaster.internal/ubuntu eoan/main amd64 liblcms2-2 amd64 2.9-3 [139 kB] Get:34 http://ftpmaster.internal/ubuntu eoan/main amd64 libglib2.0-0 amd64 2.60.4-1 [1247 kB] Get:35 http://ftpmaster.internal/ubuntu eoan/main amd64 liblqr-1-0 amd64 0.4.2-2.1 [27.7 kB] Get:36 http://ftpmaster.internal/ubuntu eoan/main amd64 libltdl7 amd64 2.4.6-10 [38.3 kB] Get:37 http://ftpmaster.internal/ubuntu eoan/main amd64 libwebp6 amd64 0.6.1-2 [185 kB] Get:38 http://ftpmaster.internal/ubuntu eoan/main amd64 libtiff5 amd64 4.0.10-4 [156 kB] Get:39 http://ftpmaster.internal/ubuntu eoan/main amd64 libwebpmux3 amd64 0.6.1-2 [19.6 kB] Get:40 http://ftpmaster.internal/ubuntu eoan/main amd64 libicu63 amd64 63.2-2 [8294 kB] Get:41 http://ftpmaster.internal/ubuntu eoan/main amd64 libxml2 amd64 2.9.4+dfsg1-7ubuntu3 [625 kB] Get:42 http://ftpmaster.internal/ubuntu eoan/main amd64 imagemagick-6-common all 8:6.9.10.23+dfsg-2.1ubuntu3 [61.1 kB] Get:43 http://ftpmaster.internal/ubuntu eoan/main amd64 libmagickcore-6.q16-6 amd64 8:6.9.10.23+dfsg-2.1ubuntu3 [1638 kB] Get:44 http://ftpmaster.internal/ubuntu eoan/main amd64 libmagickwand-6.q16-6 amd64 8:6.9.10.23+dfsg-2.1ubuntu3 [303 kB] Get:45 http://ftpmaster.internal/ubuntu eoan/main amd64 poppler-data all 0.4.9-2 [1475 kB] Get:46 http://ftpmaster.internal/ubuntu eoan/universe amd64 libpython2.7-minimal amd64 2.7.16-2 [335 kB] Get:47 http://ftpmaster.internal/ubuntu eoan/universe amd64 python2.7-minimal amd64 2.7.16-2 [1310 kB] Get:48 http://ftpmaster.internal/ubuntu eoan/universe amd64 python2-minimal amd64 2.7.16-1 [27.8 kB] Get:49 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-minimal amd64 2.7.16-1 [5996 B] Get:50 http://ftpmaster.internal/ubuntu eoan/universe amd64 libpython2.7-stdlib amd64 2.7.16-2 [1909 kB] Get:51 http://ftpmaster.internal/ubuntu eoan/universe amd64 python2.7 amd64 2.7.16-2 [244 kB] Get:52 http://ftpmaster.internal/ubuntu eoan/universe amd64 libpython2-stdlib amd64 2.7.16-1 [7432 B] Get:53 http://ftpmaster.internal/ubuntu eoan/universe amd64 libpython-stdlib amd64 2.7.16-1 [5828 B] Get:54 http://ftpmaster.internal/ubuntu eoan/universe amd64 python2 amd64 2.7.16-1 [26.5 kB] Get:55 http://ftpmaster.internal/ubuntu eoan/universe amd64 python amd64 2.7.16-1 [7836 B] Get:56 http://ftpmaster.internal/ubuntu eoan/main amd64 sgml-base all 1.29 [12.3 kB] Get:57 http://ftpmaster.internal/ubuntu eoan/main amd64 tex-common all 6.11 [32.7 kB] Get:58 http://ftpmaster.internal/ubuntu eoan/main amd64 libdbus-1-3 amd64 1.12.14-1ubuntu2 [179 kB] Get:59 http://ftpmaster.internal/ubuntu eoan/main amd64 dbus amd64 1.12.14-1ubuntu2 [151 kB] Get:60 http://ftpmaster.internal/ubuntu eoan/main amd64 libmagic-mgc amd64 1:5.35-4 [200 kB] Get:61 http://ftpmaster.internal/ubuntu eoan/main amd64 libmagic1 amd64 1:5.35-4 [74.0 kB] Get:62 http://ftpmaster.internal/ubuntu eoan/main amd64 file amd64 1:5.35-4 [22.9 kB] Get:63 http://ftpmaster.internal/ubuntu eoan/main amd64 libelf1 amd64 0.176-1.1 [44.1 kB] Get:64 http://ftpmaster.internal/ubuntu eoan/main amd64 libfribidi0 amd64 1.0.5-3.1 [26.2 kB] Get:65 http://ftpmaster.internal/ubuntu eoan/main amd64 libpam-systemd amd64 240-6ubuntu9 [119 kB] Get:66 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 python3-pkg-resources all 41.0.1-1 [100 kB] Get:67 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-six all 1.12.0-1 [11.7 kB] Get:68 http://ftpmaster.internal/ubuntu eoan/main amd64 shared-mime-info amd64 1.10-1 [428 kB] Get:69 http://ftpmaster.internal/ubuntu eoan/main amd64 xkb-data all 2.26-2ubuntu1 [333 kB] Get:70 http://ftpmaster.internal/ubuntu eoan/main amd64 gettext-base amd64 0.19.8.1-9 [50.1 kB] Get:71 http://ftpmaster.internal/ubuntu eoan/main amd64 libkrb5support0 amd64 1.17-3 [33.1 kB] Get:72 http://ftpmaster.internal/ubuntu eoan/main amd64 libk5crypto3 amd64 1.17-3 [85.7 kB] Get:73 http://ftpmaster.internal/ubuntu eoan/main amd64 libkeyutils1 amd64 1.6-6 [10.1 kB] Get:74 http://ftpmaster.internal/ubuntu eoan/main amd64 libkrb5-3 amd64 1.17-3 [331 kB] Get:75 http://ftpmaster.internal/ubuntu eoan/main amd64 libgssapi-krb5-2 amd64 1.17-3 [123 kB] Get:76 http://ftpmaster.internal/ubuntu eoan/main amd64 libpsl5 amd64 0.20.2-2 [50.0 kB] Get:77 http://ftpmaster.internal/ubuntu eoan/main amd64 hicolor-icon-theme all 0.17-2 [9976 B] Get:78 http://ftpmaster.internal/ubuntu eoan/main amd64 libgdk-pixbuf2.0-common all 2.38.1+dfsg-1 [6056 B] Get:79 http://ftpmaster.internal/ubuntu eoan/main amd64 libgdk-pixbuf2.0-0 amd64 2.38.1+dfsg-1 [170 kB] Get:80 http://ftpmaster.internal/ubuntu eoan/main amd64 gtk-update-icon-cache amd64 3.24.8-1ubuntu1 [27.8 kB] Get:81 http://ftpmaster.internal/ubuntu eoan/main amd64 libpixman-1-0 amd64 0.36.0-1 [229 kB] Get:82 http://ftpmaster.internal/ubuntu eoan/main amd64 libxcb-render0 amd64 1.13.1-2 [14.8 kB] Get:83 http://ftpmaster.internal/ubuntu eoan/main amd64 libxcb-shm0 amd64 1.13.1-2 [5548 B] Get:84 http://ftpmaster.internal/ubuntu eoan/main amd64 libxrender1 amd64 1:0.9.10-1 [18.7 kB] Get:85 http://ftpmaster.internal/ubuntu eoan/main amd64 libcairo2 amd64 1.16.0-4 [583 kB] Get:86 http://ftpmaster.internal/ubuntu eoan/main amd64 libcroco3 amd64 0.6.12-3 [81.4 kB] Get:87 http://ftpmaster.internal/ubuntu eoan/main amd64 fontconfig amd64 2.13.1-2ubuntu2 [171 kB] Get:88 http://ftpmaster.internal/ubuntu eoan/main amd64 libthai-data all 0.1.28-2 [134 kB] Get:89 http://ftpmaster.internal/ubuntu eoan/main amd64 libdatrie1 amd64 0.2.12-2 [18.5 kB] Get:90 http://ftpmaster.internal/ubuntu eoan/main amd64 libthai0 amd64 0.1.28-2 [18.1 kB] Get:91 http://ftpmaster.internal/ubuntu eoan/main amd64 libpango-1.0-0 amd64 1.42.4-6 [155 kB] Get:92 http://ftpmaster.internal/ubuntu eoan/main amd64 libgraphite2-3 amd64 1.3.13-7 [73.2 kB] Get:93 http://ftpmaster.internal/ubuntu eoan/main amd64 libharfbuzz0b amd64 2.4.0-1 [372 kB] Get:94 http://ftpmaster.internal/ubuntu eoan/main amd64 libpangoft2-1.0-0 amd64 1.42.4-6 [35.6 kB] Get:95 http://ftpmaster.internal/ubuntu eoan/main amd64 libpangocairo-1.0-0 amd64 1.42.4-6 [23.2 kB] Get:96 http://ftpmaster.internal/ubuntu eoan/main amd64 librsvg2-2 amd64 2.44.10-2.1 [1233 kB] Get:97 http://ftpmaster.internal/ubuntu eoan/main amd64 librsvg2-common amd64 2.44.10-2.1 [9076 B] Get:98 http://ftpmaster.internal/ubuntu eoan/main amd64 humanity-icon-theme all 0.6.15 [1250 kB] Get:99 http://ftpmaster.internal/ubuntu eoan/main amd64 ubuntu-mono all 19.04-0ubuntu1 [149 kB] Get:100 http://ftpmaster.internal/ubuntu eoan/main amd64 adwaita-icon-theme all 3.32.0-1ubuntu1 [3160 kB] Get:101 http://ftpmaster.internal/ubuntu eoan/main amd64 libsigsegv2 amd64 2.12-2 [13.9 kB] Get:102 http://ftpmaster.internal/ubuntu eoan/main amd64 m4 amd64 1.4.18-2 [199 kB] Get:103 http://ftpmaster.internal/ubuntu eoan/main amd64 autoconf all 2.69-11 [322 kB] Get:104 http://ftpmaster.internal/ubuntu eoan/main amd64 autotools-dev all 20180224.1 [39.6 kB] Get:105 http://ftpmaster.internal/ubuntu eoan/main amd64 automake all 1:1.16.1-4ubuntu3 [522 kB] Get:106 http://ftpmaster.internal/ubuntu eoan/main amd64 autopoint all 0.19.8.1-9 [412 kB] Get:107 http://ftpmaster.internal/ubuntu eoan/main amd64 dbus-user-session amd64 1.12.14-1ubuntu2 [9424 B] Get:108 http://ftpmaster.internal/ubuntu eoan/main amd64 libdconf1 amd64 0.32.0-1 [36.1 kB] Get:109 http://ftpmaster.internal/ubuntu eoan/main amd64 dconf-service amd64 0.32.0-1 [29.1 kB] Get:110 http://ftpmaster.internal/ubuntu eoan/main amd64 dconf-gsettings-backend amd64 0.32.0-1 [21.5 kB] Get:111 http://ftpmaster.internal/ubuntu eoan/main amd64 libtool all 2.4.6-10 [194 kB] Get:112 http://ftpmaster.internal/ubuntu eoan/main amd64 dh-autoreconf all 19 [16.1 kB] Get:113 http://ftpmaster.internal/ubuntu eoan/main amd64 libarchive-zip-perl all 1.64-1 [84.9 kB] Get:114 http://ftpmaster.internal/ubuntu eoan/main amd64 libfile-stripnondeterminism-perl all 1.1.2-1 [13.7 kB] Get:115 http://ftpmaster.internal/ubuntu eoan/main amd64 dh-strip-nondeterminism all 1.1.2-1 [5208 B] Get:116 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 dwz amd64 0.12.20190703-1 [80.5 kB] Get:117 http://ftpmaster.internal/ubuntu eoan/main amd64 gettext amd64 0.19.8.1-9 [896 kB] Get:118 http://ftpmaster.internal/ubuntu eoan/main amd64 intltool-debian all 0.35.0+20060710.5 [24.9 kB] Get:119 http://ftpmaster.internal/ubuntu eoan/main amd64 po-debconf all 1.0.21 [233 kB] Get:120 http://ftpmaster.internal/ubuntu eoan/main amd64 debhelper all 12.1.1ubuntu1 [899 kB] Get:121 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-lib2to3 all 3.7.3-1ubuntu1 [75.4 kB] Get:122 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-distutils all 3.7.3-1ubuntu1 [140 kB] Get:123 http://ftpmaster.internal/ubuntu eoan/main amd64 dh-python all 3.20190308 [94.5 kB] Get:124 http://ftpmaster.internal/ubuntu eoan/main amd64 xml-core all 0.18+nmu1 [21.6 kB] Get:125 http://ftpmaster.internal/ubuntu eoan/main amd64 docutils-common all 0.14+dfsg-4 [156 kB] Get:126 http://ftpmaster.internal/ubuntu eoan/main amd64 libxpm4 amd64 1:3.5.12-1 [34.0 kB] Get:127 http://ftpmaster.internal/ubuntu eoan/main amd64 libgd3 amd64 2.2.5-5.2 [118 kB] Get:128 http://ftpmaster.internal/ubuntu eoan/main amd64 libkpathsea6 amd64 2018.20181218.49446-2 [55.8 kB] Get:129 http://ftpmaster.internal/ubuntu eoan/main amd64 libptexenc1 amd64 2018.20181218.49446-2 [35.2 kB] Get:130 http://ftpmaster.internal/ubuntu eoan/main amd64 libsynctex2 amd64 2018.20181218.49446-2 [53.9 kB] Get:131 http://ftpmaster.internal/ubuntu eoan/main amd64 libtexlua52 amd64 2018.20181218.49446-2 [89.9 kB] Get:132 http://ftpmaster.internal/ubuntu eoan/main amd64 libtexlua53 amd64 2018.20181218.49446-2 [103 kB] Get:133 http://ftpmaster.internal/ubuntu eoan/main amd64 libtexluajit2 amd64 2018.20181218.49446-2 [234 kB] Get:134 http://ftpmaster.internal/ubuntu eoan/main amd64 t1utils amd64 1.41-3 [56.1 kB] Get:135 http://ftpmaster.internal/ubuntu eoan/main amd64 libbrotli1 amd64 1.0.7-2 [268 kB] Get:136 http://ftpmaster.internal/ubuntu eoan/main amd64 libavahi-common-data amd64 0.7-4ubuntu5 [21.4 kB] Get:137 http://ftpmaster.internal/ubuntu eoan/main amd64 libavahi-common3 amd64 0.7-4ubuntu5 [21.6 kB] Get:138 http://ftpmaster.internal/ubuntu eoan/main amd64 libavahi-client3 amd64 0.7-4ubuntu5 [25.4 kB] Get:139 http://ftpmaster.internal/ubuntu eoan/main amd64 libcups2 amd64 2.2.10-6ubuntu1 [211 kB] Get:140 http://ftpmaster.internal/ubuntu eoan/main amd64 libcupsimage2 amd64 2.2.10-6ubuntu1 [18.4 kB] Get:141 http://ftpmaster.internal/ubuntu eoan/main amd64 libijs-0.35 amd64 0.35-14 [15.3 kB] Get:142 http://ftpmaster.internal/ubuntu eoan/main amd64 libjbig2dec0 amd64 0.16-1 [58.4 kB] Get:143 http://ftpmaster.internal/ubuntu eoan/main amd64 libpaper1 amd64 1.1.28 [13.0 kB] Get:144 http://ftpmaster.internal/ubuntu eoan/main amd64 libgs9-common all 9.26~dfsg+0-0ubuntu8 [5094 kB] Get:145 http://ftpmaster.internal/ubuntu eoan/main amd64 libgs9 amd64 9.26~dfsg+0-0ubuntu8 [2390 kB] Get:146 http://ftpmaster.internal/ubuntu eoan/main amd64 libharfbuzz-icu0 amd64 2.4.0-1 [5472 B] Get:147 http://ftpmaster.internal/ubuntu eoan/main amd64 libpotrace0 amd64 1.15-1 [17.5 kB] Get:148 http://ftpmaster.internal/ubuntu eoan/main amd64 libteckit0 amd64 2.5.8+ds2-5ubuntu1 [317 kB] Get:149 http://ftpmaster.internal/ubuntu eoan/main amd64 libwoff1 amd64 1.0.2-1build1 [42.1 kB] Get:150 http://ftpmaster.internal/ubuntu eoan/main amd64 x11-common all 1:7.7+19ubuntu12 [22.4 kB] Get:151 http://ftpmaster.internal/ubuntu eoan/main amd64 libice6 amd64 2:1.0.9-2 [40.2 kB] Get:152 http://ftpmaster.internal/ubuntu eoan/main amd64 libsm6 amd64 2:1.2.3-1 [16.1 kB] Get:153 http://ftpmaster.internal/ubuntu eoan/main amd64 libxt6 amd64 1:1.1.5-1 [160 kB] Get:154 http://ftpmaster.internal/ubuntu eoan/main amd64 libxmu6 amd64 2:1.1.2-2 [46.0 kB] Get:155 http://ftpmaster.internal/ubuntu eoan/main amd64 libxaw7 amd64 2:1.0.13-1 [173 kB] Get:156 http://ftpmaster.internal/ubuntu eoan/main amd64 libxi6 amd64 2:1.7.9-1 [29.2 kB] Get:157 http://ftpmaster.internal/ubuntu eoan/main amd64 libxxhash0 amd64 0.6.5-3 [7236 B] Get:158 http://ftpmaster.internal/ubuntu eoan/main amd64 libzzip-0-13 amd64 0.13.62-3.2 [25.8 kB] Get:159 http://ftpmaster.internal/ubuntu eoan/main amd64 texlive-binaries amd64 2018.20181218.49446-2 [11.5 MB] Get:160 http://ftpmaster.internal/ubuntu eoan/main amd64 ghostscript amd64 9.26~dfsg+0-0ubuntu8 [51.4 kB] Get:161 http://ftpmaster.internal/ubuntu eoan/universe amd64 dvipng amd64 1.15-1.1 [78.9 kB] Get:162 http://ftpmaster.internal/ubuntu eoan/main amd64 fonts-lmodern all 2.004.5-6 [4532 kB] Get:163 http://ftpmaster.internal/ubuntu eoan/main amd64 libproxy1v5 amd64 0.4.15-5 [50.4 kB] Get:164 http://ftpmaster.internal/ubuntu eoan/main amd64 glib-networking-common all 2.60.3-1 [3056 B] Get:165 http://ftpmaster.internal/ubuntu eoan/main amd64 glib-networking-services amd64 2.60.3-1 [8432 B] Get:166 http://ftpmaster.internal/ubuntu eoan/main amd64 gsettings-desktop-schemas all 3.31.91-1ubuntu1 [28.4 kB] Get:167 http://ftpmaster.internal/ubuntu eoan/main amd64 glib-networking amd64 2.60.3-1 [50.9 kB] Get:168 http://ftpmaster.internal/ubuntu eoan/universe amd64 libcdt5 amd64 2.40.1-6 [19.3 kB] Get:169 http://ftpmaster.internal/ubuntu eoan/universe amd64 libcgraph6 amd64 2.40.1-6 [40.7 kB] Get:170 http://ftpmaster.internal/ubuntu eoan/universe amd64 libgts-0.7-5 amd64 0.7.6+darcs121130-4 [150 kB] Get:171 http://ftpmaster.internal/ubuntu eoan/universe amd64 libpathplan4 amd64 2.40.1-6 [22.0 kB] Get:172 http://ftpmaster.internal/ubuntu eoan/universe amd64 libgvc6 amd64 2.40.1-6 [599 kB] Get:173 http://ftpmaster.internal/ubuntu eoan/universe amd64 libgvpr2 amd64 2.40.1-6 [170 kB] Get:174 http://ftpmaster.internal/ubuntu eoan/universe amd64 liblab-gamut1 amd64 2.40.1-6 [178 kB] Get:175 http://ftpmaster.internal/ubuntu eoan/universe amd64 graphviz amd64 2.40.1-6 [558 kB] Get:176 http://ftpmaster.internal/ubuntu eoan/universe amd64 imagemagick-6.q16 amd64 8:6.9.10.23+dfsg-2.1ubuntu3 [427 kB] Get:177 http://ftpmaster.internal/ubuntu eoan/main amd64 libatk1.0-data all 2.32.0-1 [2964 B] Get:178 http://ftpmaster.internal/ubuntu eoan/main amd64 libatk1.0-0 amd64 2.32.0-1 [44.5 kB] Get:179 http://ftpmaster.internal/ubuntu eoan/main amd64 libatspi2.0-0 amd64 2.32.0-1 [60.0 kB] Get:180 http://ftpmaster.internal/ubuntu eoan/main amd64 libatk-bridge2.0-0 amd64 2.32.0-1 [56.9 kB] Get:181 http://ftpmaster.internal/ubuntu eoan/main amd64 libcairo-gobject2 amd64 1.16.0-4 [17.2 kB] Get:182 http://ftpmaster.internal/ubuntu eoan/main amd64 libcolord2 amd64 1.4.3-4 [132 kB] Get:183 http://ftpmaster.internal/ubuntu eoan/main amd64 libepoxy0 amd64 1.5.3-0.1 [188 kB] Get:184 http://ftpmaster.internal/ubuntu eoan/main amd64 libjson-glib-1.0-common all 1.4.4-2 [3496 B] Get:185 http://ftpmaster.internal/ubuntu eoan/main amd64 libjson-glib-1.0-0 amd64 1.4.4-2 [58.8 kB] Get:186 http://ftpmaster.internal/ubuntu eoan/main amd64 libsoup2.4-1 amd64 2.66.1-1 [241 kB] Get:187 http://ftpmaster.internal/ubuntu eoan/main amd64 libsoup-gnome2.4-1 amd64 2.66.1-1 [5100 B] Get:188 http://ftpmaster.internal/ubuntu eoan/main amd64 librest-0.7-0 amd64 0.8.1-1 [32.2 kB] Get:189 http://ftpmaster.internal/ubuntu eoan/main amd64 libwayland-client0 amd64 1.16.0-1ubuntu2 [23.6 kB] Get:190 http://ftpmaster.internal/ubuntu eoan/main amd64 libwayland-cursor0 amd64 1.16.0-1ubuntu2 [9960 B] Get:191 http://ftpmaster.internal/ubuntu eoan/main amd64 libwayland-egl1 amd64 1.16.0-1ubuntu2 [5588 B] Get:192 http://ftpmaster.internal/ubuntu eoan/main amd64 libxcomposite1 amd64 1:0.4.4-2 [6988 B] Get:193 http://ftpmaster.internal/ubuntu eoan/main amd64 libxfixes3 amd64 1:5.0.3-1 [10.8 kB] Get:194 http://ftpmaster.internal/ubuntu eoan/main amd64 libxcursor1 amd64 1:1.2.0-1 [19.8 kB] Get:195 http://ftpmaster.internal/ubuntu eoan/main amd64 libxdamage1 amd64 1:1.1.4-3 [6934 B] Get:196 http://ftpmaster.internal/ubuntu eoan/main amd64 libxinerama1 amd64 2:1.1.4-2 [6904 B] Get:197 http://ftpmaster.internal/ubuntu eoan/main amd64 libxkbcommon0 amd64 0.8.2-1 [97.8 kB] Get:198 http://ftpmaster.internal/ubuntu eoan/main amd64 libxrandr2 amd64 2:1.5.1-1 [18.1 kB] Get:199 http://ftpmaster.internal/ubuntu eoan/main amd64 libgtk-3-common all 3.24.8-1ubuntu1 [231 kB] Get:200 http://ftpmaster.internal/ubuntu eoan/main amd64 libgtk-3-0 amd64 3.24.8-1ubuntu1 [2530 kB] Get:201 http://ftpmaster.internal/ubuntu eoan/main amd64 libjs-jquery all 3.3.1~dfsg-3 [329 kB] Get:202 http://ftpmaster.internal/ubuntu eoan/main amd64 libjs-underscore all 1.9.1~dfsg-1 [98.6 kB] Get:203 http://ftpmaster.internal/ubuntu eoan/main amd64 libjs-sphinxdoc all 1.8.5-1ubuntu1 [96.4 kB] Get:204 http://ftpmaster.internal/ubuntu eoan/main amd64 libpaper-utils amd64 1.1.28 [8400 B] Get:205 http://ftpmaster.internal/ubuntu eoan/universe amd64 librsvg2-bin amd64 2.44.10-2.1 [20.7 kB] Get:206 http://ftpmaster.internal/ubuntu eoan/main amd64 libstemmer0d amd64 0+svn585-1build1 [62.5 kB] Get:207 http://ftpmaster.internal/ubuntu eoan/universe amd64 libtext-unidecode-perl all 1.30-1 [99.0 kB] Get:208 http://ftpmaster.internal/ubuntu eoan/main amd64 libxml-namespacesupport-perl all 1.12-1 [13.2 kB] Get:209 http://ftpmaster.internal/ubuntu eoan/main amd64 libxml-sax-base-perl all 1.09-1 [18.8 kB] Get:210 http://ftpmaster.internal/ubuntu eoan/main amd64 libxml-sax-perl all 1.00+dfsg-1.1~build1 [56.1 kB] Get:211 http://ftpmaster.internal/ubuntu eoan/main amd64 libxml-libxml-perl amd64 2.0134+dfsg-1 [319 kB] Get:212 http://ftpmaster.internal/ubuntu eoan/main amd64 preview-latex-style all 11.91-1ubuntu1 [185 kB] Get:213 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-all amd64 2.7.16-1 [1088 B] Get:214 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-atomicwrites all 1.1.5-2 [6856 B] Get:215 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-attr all 18.2.0-1 [29.6 kB] Get:216 http://ftpmaster.internal/ubuntu eoan/main amd64 python-babel-localedata all 2.6.0+dfsg.1-1 [4071 kB] Get:217 http://ftpmaster.internal/ubuntu eoan-proposed/universe amd64 python-pkg-resources all 41.0.1-1 [129 kB] Get:218 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-tz all 2019.1-1 [31.2 kB] Get:219 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-babel all 2.6.0+dfsg.1-1 [84.1 kB] Get:220 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-certifi all 2018.8.24-1 [140 kB] Get:221 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-chardet all 3.0.4-3 [80.6 kB] Get:222 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-roman all 2.0.0-3 [8548 B] Get:223 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-docutils all 0.14+dfsg-4 [365 kB] Get:224 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-enum34 all 1.1.6-2 [34.8 kB] Get:225 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-funcsigs all 1.0.2-4 [13.5 kB] Get:226 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-six all 1.12.0-1 [11.6 kB] Get:227 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-webencodings all 0.5.1-1 [10.8 kB] Get:228 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-html5lib all 1.0.1-1 [84.5 kB] Get:229 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-idna all 2.6-1 [32.4 kB] Get:230 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-imagesize all 1.0.0-1 [4928 B] Get:231 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-markupsafe amd64 1.1.0-1 [13.1 kB] Get:232 http://ftpmaster.internal/ubuntu eoan-proposed/universe amd64 python-jinja2 all 2.10-2ubuntu1 [94.9 kB] Get:233 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-more-itertools all 4.2.0-1 [39.4 kB] Get:234 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-pyparsing all 2.2.0+dfsg1-2 [52.1 kB] Get:235 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-packaging all 19.0-1 [18.3 kB] Get:236 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-scandir amd64 1.10.0-1 [18.4 kB] Get:237 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-pathlib2 all 2.3.3-1 [16.4 kB] Get:238 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-pluggy all 0.8.0-1 [17.5 kB] Get:239 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-py all 1.7.0-2 [65.4 kB] Get:240 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-pygments all 2.3.1+dfsg-1ubuntu1 [582 kB] Get:241 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-pytest all 3.10.1-2 [166 kB] Get:242 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-urllib3 all 1.24.1-1ubuntu1 [83.7 kB] Get:243 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-requests all 2.21.0-1 [47.0 kB] Get:244 http://ftpmaster.internal/ubuntu eoan-proposed/universe amd64 python-setuptools all 41.0.1-1 [329 kB] Get:245 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-stemmer amd64 1.3.0+dfsg-1build9 [27.8 kB] Get:246 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-typing all 3.6.6-1 [22.8 kB] Get:247 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-all amd64 3.7.3-1 [1112 B] Get:248 http://ftpmaster.internal/ubuntu eoan/universe amd64 python3-atomicwrites all 1.1.5-2 [6932 B] Get:249 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-attr all 18.2.0-1 [29.6 kB] Get:250 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-tz all 2019.1-1 [24.6 kB] Get:251 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-babel all 2.6.0+dfsg.1-1 [83.4 kB] Get:252 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-certifi all 2018.8.24-1 [140 kB] Get:253 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-chardet all 3.0.4-3 [80.4 kB] Get:254 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-roman all 2.0.0-3 [8624 B] Get:255 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-docutils all 0.14+dfsg-4 [363 kB] Get:256 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-webencodings all 0.5.1-1 [10.9 kB] Get:257 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-html5lib all 1.0.1-1 [84.2 kB] Get:258 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-idna all 2.6-1 [32.5 kB] Get:259 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-imagesize all 1.0.0-1 [5004 B] Get:260 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-markupsafe amd64 1.1.0-1 [13.8 kB] Get:261 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 python3-jinja2 all 2.10-2ubuntu1 [95.5 kB] Get:262 http://ftpmaster.internal/ubuntu eoan/universe amd64 python3-more-itertools all 4.2.0-1 [39.3 kB] Get:263 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-pyparsing all 2.2.0+dfsg1-2 [52.2 kB] Get:264 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-packaging all 19.0-1 [18.4 kB] Get:265 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 python3-setuptools all 41.0.1-1 [252 kB] Get:266 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-pbr all 5.1.1-0ubuntu2 [61.1 kB] Get:267 http://ftpmaster.internal/ubuntu eoan/universe amd64 python3-pluggy all 0.8.0-1 [17.5 kB] Get:268 http://ftpmaster.internal/ubuntu eoan/universe amd64 python3-py all 1.7.0-2 [65.5 kB] Get:269 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-pygments all 2.3.1+dfsg-1ubuntu1 [580 kB] Get:270 http://ftpmaster.internal/ubuntu eoan/universe amd64 python3-pytest all 3.10.1-2 [166 kB] Get:271 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-urllib3 all 1.24.1-1ubuntu1 [83.8 kB] Get:272 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-requests all 2.21.0-1 [46.8 kB] Get:273 http://ftpmaster.internal/ubuntu eoan/main amd64 sphinx-common all 1.8.5-1ubuntu1 [500 kB] Get:274 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-alabaster all 0.7.8-1 [18.5 kB] Get:275 http://ftpmaster.internal/ubuntu eoan/main amd64 python3-sphinx all 1.8.5-1ubuntu1 [482 kB] Get:276 http://ftpmaster.internal/ubuntu eoan/universe amd64 python3-sphinxcontrib.websupport all 1.1.0-2 [19.0 kB] Get:277 http://ftpmaster.internal/ubuntu eoan/universe amd64 python3-stemmer amd64 1.3.0+dfsg-1build9 [28.8 kB] Get:278 http://ftpmaster.internal/ubuntu eoan/universe amd64 teckit amd64 2.5.8+ds2-5ubuntu1 [688 kB] Get:279 http://ftpmaster.internal/ubuntu eoan/universe amd64 texinfo amd64 6.5.0.dfsg.1-5 [849 kB] Get:280 http://ftpmaster.internal/ubuntu eoan/main amd64 xdg-utils all 1.1.3-1ubuntu2 [60.5 kB] Get:281 http://ftpmaster.internal/ubuntu eoan/main amd64 texlive-base all 2018.20190227-2 [19.7 MB] Get:282 http://ftpmaster.internal/ubuntu eoan/universe amd64 texlive-fonts-recommended all 2018.20190227-2 [5200 kB] Get:283 http://ftpmaster.internal/ubuntu eoan/main amd64 texlive-latex-base all 2018.20190227-2 [954 kB] Get:284 http://ftpmaster.internal/ubuntu eoan/main amd64 texlive-latex-recommended all 2018.20190227-2 [15.2 MB] Get:285 http://ftpmaster.internal/ubuntu eoan/universe amd64 texlive-pictures all 2018.20190227-2 [8108 kB] Get:286 http://ftpmaster.internal/ubuntu eoan/universe amd64 texlive-latex-extra all 2018.20190227-2 [11.9 MB] Get:287 http://ftpmaster.internal/ubuntu eoan/universe amd64 texlive-luatex all 2018.20190227-2 [8193 kB] Get:288 http://ftpmaster.internal/ubuntu eoan/universe amd64 tipa all 2:1.3-20 [2978 kB] Get:289 http://ftpmaster.internal/ubuntu eoan/universe amd64 texlive-xetex all 2018.20190227-2 [14.3 MB] Get:290 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-alabaster all 0.7.8-1 [18.4 kB] Get:291 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-pbr all 5.1.1-0ubuntu2 [61.0 kB] Get:292 http://ftpmaster.internal/ubuntu eoan/universe amd64 python-mock all 2.0.0-4 [47.6 kB] Get:293 http://ftpmaster.internal/ubuntu eoan/universe amd64 python3-mock all 2.0.0-4 [47.7 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 175 MB in 3s (67.0 MB/s) Selecting previously unselected package libpython3.7-minimal:amd64. (Reading database ... 12884 files and directories currently installed.) Preparing to unpack .../libpython3.7-minimal_3.7.4~rc2-1_amd64.deb ... Unpacking libpython3.7-minimal:amd64 (3.7.4~rc2-1) ... Selecting previously unselected package libexpat1:amd64. Preparing to unpack .../libexpat1_2.2.6-2_amd64.deb ... Unpacking libexpat1:amd64 (2.2.6-2) ... Selecting previously unselected package python3.7-minimal. Preparing to unpack .../python3.7-minimal_3.7.4~rc2-1_amd64.deb ... Unpacking python3.7-minimal (3.7.4~rc2-1) ... Setting up libpython3.7-minimal:amd64 (3.7.4~rc2-1) ... Setting up libexpat1:amd64 (2.2.6-2) ... Setting up python3.7-minimal (3.7.4~rc2-1) ... Selecting previously unselected package python3-minimal. (Reading database ... 13133 files and directories currently installed.) Preparing to unpack .../0-python3-minimal_3.7.3-1_amd64.deb ... Unpacking python3-minimal (3.7.3-1) ... Selecting previously unselected package mime-support. Preparing to unpack .../1-mime-support_3.62ubuntu1_all.deb ... Unpacking mime-support (3.62ubuntu1) ... Selecting previously unselected package libmpdec2:amd64. Preparing to unpack .../2-libmpdec2_2.4.2-2_amd64.deb ... Unpacking libmpdec2:amd64 (2.4.2-2) ... Selecting previously unselected package libpython3.7-stdlib:amd64. Preparing to unpack .../3-libpython3.7-stdlib_3.7.4~rc2-1_amd64.deb ... Unpacking libpython3.7-stdlib:amd64 (3.7.4~rc2-1) ... Selecting previously unselected package python3.7. Preparing to unpack .../4-python3.7_3.7.4~rc2-1_amd64.deb ... Unpacking python3.7 (3.7.4~rc2-1) ... Selecting previously unselected package libpython3-stdlib:amd64. Preparing to unpack .../5-libpython3-stdlib_3.7.3-1_amd64.deb ... Unpacking libpython3-stdlib:amd64 (3.7.3-1) ... Setting up python3-minimal (3.7.3-1) ... Selecting previously unselected package python3. (Reading database ... 13571 files and directories currently installed.) Preparing to unpack .../00-python3_3.7.3-1_amd64.deb ... Unpacking python3 (3.7.3-1) ... Selecting previously unselected package libxau6:amd64. Preparing to unpack .../01-libxau6_1%3a1.0.8-1_amd64.deb ... Unpacking libxau6:amd64 (1:1.0.8-1) ... Selecting previously unselected package libbsd0:amd64. Preparing to unpack .../02-libbsd0_0.9.1-2_amd64.deb ... Unpacking libbsd0:amd64 (0.9.1-2) ... Selecting previously unselected package libxdmcp6:amd64. Preparing to unpack .../03-libxdmcp6_1%3a1.1.2-3_amd64.deb ... Unpacking libxdmcp6:amd64 (1:1.1.2-3) ... Selecting previously unselected package libxcb1:amd64. Preparing to unpack .../04-libxcb1_1.13.1-2_amd64.deb ... Unpacking libxcb1:amd64 (1.13.1-2) ... Selecting previously unselected package libx11-data. Preparing to unpack .../05-libx11-data_2%3a1.6.7-1_all.deb ... Unpacking libx11-data (2:1.6.7-1) ... Selecting previously unselected package libx11-6:amd64. Preparing to unpack .../06-libx11-6_2%3a1.6.7-1_amd64.deb ... Unpacking libx11-6:amd64 (2:1.6.7-1) ... Selecting previously unselected package libxext6:amd64. Preparing to unpack .../07-libxext6_2%3a1.3.3-1_amd64.deb ... Unpacking libxext6:amd64 (2:1.3.3-1) ... Selecting previously unselected package bsdmainutils. Preparing to unpack .../08-bsdmainutils_11.1.2ubuntu2_amd64.deb ... Unpacking bsdmainutils (11.1.2ubuntu2) ... Selecting previously unselected package libuchardet0:amd64. Preparing to unpack .../09-libuchardet0_0.0.6-3_amd64.deb ... Unpacking libuchardet0:amd64 (0.0.6-3) ... Selecting previously unselected package groff-base. Preparing to unpack .../10-groff-base_1.22.4-3_amd64.deb ... Unpacking groff-base (1.22.4-3) ... Selecting previously unselected package libpipeline1:amd64. Preparing to unpack .../11-libpipeline1_1.5.1-2_amd64.deb ... Unpacking libpipeline1:amd64 (1.5.1-2) ... Selecting previously unselected package man-db. Preparing to unpack .../12-man-db_2.8.5-2_amd64.deb ... Unpacking man-db (2.8.5-2) ... Selecting previously unselected package libfftw3-double3:amd64. Preparing to unpack .../13-libfftw3-double3_3.3.8-2_amd64.deb ... Unpacking libfftw3-double3:amd64 (3.3.8-2) ... Selecting previously unselected package libfreetype6:amd64. Preparing to unpack .../14-libfreetype6_2.9.1-3_amd64.deb ... Unpacking libfreetype6:amd64 (2.9.1-3) ... Selecting previously unselected package ucf. Preparing to unpack .../15-ucf_3.0038+nmu1_all.deb ... Moving old data out of the way Unpacking ucf (3.0038+nmu1) ... Selecting previously unselected package fonts-dejavu-core. Preparing to unpack .../16-fonts-dejavu-core_2.37-1_all.deb ... Unpacking fonts-dejavu-core (2.37-1) ... Selecting previously unselected package fontconfig-config. Preparing to unpack .../17-fontconfig-config_2.13.1-2ubuntu2_all.deb ... Unpacking fontconfig-config (2.13.1-2ubuntu2) ... Selecting previously unselected package libfontconfig1:amd64. Preparing to unpack .../18-libfontconfig1_2.13.1-2ubuntu2_amd64.deb ... Unpacking libfontconfig1:amd64 (2.13.1-2ubuntu2) ... Selecting previously unselected package libjbig0:amd64. Preparing to unpack .../19-libjbig0_2.1-3.1build1_amd64.deb ... Unpacking libjbig0:amd64 (2.1-3.1build1) ... Selecting previously unselected package libjpeg-turbo8:amd64. Preparing to unpack .../20-libjpeg-turbo8_2.0.1-0ubuntu2_amd64.deb ... Unpacking libjpeg-turbo8:amd64 (2.0.1-0ubuntu2) ... Selecting previously unselected package libjpeg8:amd64. Preparing to unpack .../21-libjpeg8_8c-2ubuntu8_amd64.deb ... Unpacking libjpeg8:amd64 (8c-2ubuntu8) ... Selecting previously unselected package liblcms2-2:amd64. Preparing to unpack .../22-liblcms2-2_2.9-3_amd64.deb ... Unpacking liblcms2-2:amd64 (2.9-3) ... Selecting previously unselected package libglib2.0-0:amd64. Preparing to unpack .../23-libglib2.0-0_2.60.4-1_amd64.deb ... Unpacking libglib2.0-0:amd64 (2.60.4-1) ... Selecting previously unselected package liblqr-1-0:amd64. Preparing to unpack .../24-liblqr-1-0_0.4.2-2.1_amd64.deb ... Unpacking liblqr-1-0:amd64 (0.4.2-2.1) ... Selecting previously unselected package libltdl7:amd64. Preparing to unpack .../25-libltdl7_2.4.6-10_amd64.deb ... Unpacking libltdl7:amd64 (2.4.6-10) ... Selecting previously unselected package libwebp6:amd64. Preparing to unpack .../26-libwebp6_0.6.1-2_amd64.deb ... Unpacking libwebp6:amd64 (0.6.1-2) ... Selecting previously unselected package libtiff5:amd64. Preparing to unpack .../27-libtiff5_4.0.10-4_amd64.deb ... Unpacking libtiff5:amd64 (4.0.10-4) ... Selecting previously unselected package libwebpmux3:amd64. Preparing to unpack .../28-libwebpmux3_0.6.1-2_amd64.deb ... Unpacking libwebpmux3:amd64 (0.6.1-2) ... Selecting previously unselected package libicu63:amd64. Preparing to unpack .../29-libicu63_63.2-2_amd64.deb ... Unpacking libicu63:amd64 (63.2-2) ... Selecting previously unselected package libxml2:amd64. Preparing to unpack .../30-libxml2_2.9.4+dfsg1-7ubuntu3_amd64.deb ... Unpacking libxml2:amd64 (2.9.4+dfsg1-7ubuntu3) ... Selecting previously unselected package imagemagick-6-common. Preparing to unpack .../31-imagemagick-6-common_8%3a6.9.10.23+dfsg-2.1ubuntu3_all.deb ... Unpacking imagemagick-6-common (8:6.9.10.23+dfsg-2.1ubuntu3) ... Selecting previously unselected package libmagickcore-6.q16-6:amd64. Preparing to unpack .../32-libmagickcore-6.q16-6_8%3a6.9.10.23+dfsg-2.1ubuntu3_amd64.deb ... Unpacking libmagickcore-6.q16-6:amd64 (8:6.9.10.23+dfsg-2.1ubuntu3) ... Selecting previously unselected package libmagickwand-6.q16-6:amd64. Preparing to unpack .../33-libmagickwand-6.q16-6_8%3a6.9.10.23+dfsg-2.1ubuntu3_amd64.deb ... Unpacking libmagickwand-6.q16-6:amd64 (8:6.9.10.23+dfsg-2.1ubuntu3) ... Selecting previously unselected package poppler-data. Preparing to unpack .../34-poppler-data_0.4.9-2_all.deb ... Unpacking poppler-data (0.4.9-2) ... Selecting previously unselected package libpython2.7-minimal:amd64. Preparing to unpack .../35-libpython2.7-minimal_2.7.16-2_amd64.deb ... Unpacking libpython2.7-minimal:amd64 (2.7.16-2) ... Selecting previously unselected package python2.7-minimal. Preparing to unpack .../36-python2.7-minimal_2.7.16-2_amd64.deb ... Unpacking python2.7-minimal (2.7.16-2) ... Selecting previously unselected package python2-minimal. Preparing to unpack .../37-python2-minimal_2.7.16-1_amd64.deb ... Unpacking python2-minimal (2.7.16-1) ... Selecting previously unselected package python-minimal. Preparing to unpack .../38-python-minimal_2.7.16-1_amd64.deb ... Unpacking python-minimal (2.7.16-1) ... Selecting previously unselected package libpython2.7-stdlib:amd64. Preparing to unpack .../39-libpython2.7-stdlib_2.7.16-2_amd64.deb ... Unpacking libpython2.7-stdlib:amd64 (2.7.16-2) ... Selecting previously unselected package python2.7. Preparing to unpack .../40-python2.7_2.7.16-2_amd64.deb ... Unpacking python2.7 (2.7.16-2) ... Selecting previously unselected package libpython2-stdlib:amd64. Preparing to unpack .../41-libpython2-stdlib_2.7.16-1_amd64.deb ... Unpacking libpython2-stdlib:amd64 (2.7.16-1) ... Selecting previously unselected package libpython-stdlib:amd64. Preparing to unpack .../42-libpython-stdlib_2.7.16-1_amd64.deb ... Unpacking libpython-stdlib:amd64 (2.7.16-1) ... Setting up libpython2.7-minimal:amd64 (2.7.16-2) ... Setting up python2.7-minimal (2.7.16-2) ... Setting up python2-minimal (2.7.16-1) ... Selecting previously unselected package python2. (Reading database ... 16267 files and directories currently installed.) Preparing to unpack .../python2_2.7.16-1_amd64.deb ... Unpacking python2 (2.7.16-1) ... Setting up python-minimal (2.7.16-1) ... Selecting previously unselected package python. (Reading database ... 16299 files and directories currently installed.) Preparing to unpack .../000-python_2.7.16-1_amd64.deb ... Unpacking python (2.7.16-1) ... Selecting previously unselected package sgml-base. Preparing to unpack .../001-sgml-base_1.29_all.deb ... Unpacking sgml-base (1.29) ... Selecting previously unselected package tex-common. Preparing to unpack .../002-tex-common_6.11_all.deb ... Unpacking tex-common (6.11) ... Selecting previously unselected package libdbus-1-3:amd64. Preparing to unpack .../003-libdbus-1-3_1.12.14-1ubuntu2_amd64.deb ... Unpacking libdbus-1-3:amd64 (1.12.14-1ubuntu2) ... Selecting previously unselected package dbus. Preparing to unpack .../004-dbus_1.12.14-1ubuntu2_amd64.deb ... Unpacking dbus (1.12.14-1ubuntu2) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../005-libmagic-mgc_1%3a5.35-4_amd64.deb ... Unpacking libmagic-mgc (1:5.35-4) ... Selecting previously unselected package libmagic1:amd64. Preparing to unpack .../006-libmagic1_1%3a5.35-4_amd64.deb ... Unpacking libmagic1:amd64 (1:5.35-4) ... Selecting previously unselected package file. Preparing to unpack .../007-file_1%3a5.35-4_amd64.deb ... Unpacking file (1:5.35-4) ... Selecting previously unselected package libelf1:amd64. Preparing to unpack .../008-libelf1_0.176-1.1_amd64.deb ... Unpacking libelf1:amd64 (0.176-1.1) ... Selecting previously unselected package libfribidi0:amd64. Preparing to unpack .../009-libfribidi0_1.0.5-3.1_amd64.deb ... Unpacking libfribidi0:amd64 (1.0.5-3.1) ... Selecting previously unselected package libpam-systemd:amd64. Preparing to unpack .../010-libpam-systemd_240-6ubuntu9_amd64.deb ... Unpacking libpam-systemd:amd64 (240-6ubuntu9) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../011-python3-pkg-resources_41.0.1-1_all.deb ... Unpacking python3-pkg-resources (41.0.1-1) ... Selecting previously unselected package python3-six. Preparing to unpack .../012-python3-six_1.12.0-1_all.deb ... Unpacking python3-six (1.12.0-1) ... Selecting previously unselected package shared-mime-info. Preparing to unpack .../013-shared-mime-info_1.10-1_amd64.deb ... Unpacking shared-mime-info (1.10-1) ... Selecting previously unselected package xkb-data. Preparing to unpack .../014-xkb-data_2.26-2ubuntu1_all.deb ... Unpacking xkb-data (2.26-2ubuntu1) ... Selecting previously unselected package gettext-base. Preparing to unpack .../015-gettext-base_0.19.8.1-9_amd64.deb ... Unpacking gettext-base (0.19.8.1-9) ... Selecting previously unselected package libkrb5support0:amd64. Preparing to unpack .../016-libkrb5support0_1.17-3_amd64.deb ... Unpacking libkrb5support0:amd64 (1.17-3) ... Selecting previously unselected package libk5crypto3:amd64. Preparing to unpack .../017-libk5crypto3_1.17-3_amd64.deb ... Unpacking libk5crypto3:amd64 (1.17-3) ... Selecting previously unselected package libkeyutils1:amd64. Preparing to unpack .../018-libkeyutils1_1.6-6_amd64.deb ... Unpacking libkeyutils1:amd64 (1.6-6) ... Selecting previously unselected package libkrb5-3:amd64. Preparing to unpack .../019-libkrb5-3_1.17-3_amd64.deb ... Unpacking libkrb5-3:amd64 (1.17-3) ... Selecting previously unselected package libgssapi-krb5-2:amd64. Preparing to unpack .../020-libgssapi-krb5-2_1.17-3_amd64.deb ... Unpacking libgssapi-krb5-2:amd64 (1.17-3) ... Selecting previously unselected package libpsl5:amd64. Preparing to unpack .../021-libpsl5_0.20.2-2_amd64.deb ... Unpacking libpsl5:amd64 (0.20.2-2) ... Selecting previously unselected package hicolor-icon-theme. Preparing to unpack .../022-hicolor-icon-theme_0.17-2_all.deb ... Unpacking hicolor-icon-theme (0.17-2) ... Selecting previously unselected package libgdk-pixbuf2.0-common. Preparing to unpack .../023-libgdk-pixbuf2.0-common_2.38.1+dfsg-1_all.deb ... Unpacking libgdk-pixbuf2.0-common (2.38.1+dfsg-1) ... Selecting previously unselected package libgdk-pixbuf2.0-0:amd64. Preparing to unpack .../024-libgdk-pixbuf2.0-0_2.38.1+dfsg-1_amd64.deb ... Unpacking libgdk-pixbuf2.0-0:amd64 (2.38.1+dfsg-1) ... Selecting previously unselected package gtk-update-icon-cache. Preparing to unpack .../025-gtk-update-icon-cache_3.24.8-1ubuntu1_amd64.deb ... No diversion 'diversion of /usr/sbin/update-icon-caches to /usr/sbin/update-icon-caches.gtk2 by libgtk-3-bin', none removed. No diversion 'diversion of /usr/share/man/man8/update-icon-caches.8.gz to /usr/share/man/man8/update-icon-caches.gtk2.8.gz by libgtk-3-bin', none removed. Unpacking gtk-update-icon-cache (3.24.8-1ubuntu1) ... Selecting previously unselected package libpixman-1-0:amd64. Preparing to unpack .../026-libpixman-1-0_0.36.0-1_amd64.deb ... Unpacking libpixman-1-0:amd64 (0.36.0-1) ... Selecting previously unselected package libxcb-render0:amd64. Preparing to unpack .../027-libxcb-render0_1.13.1-2_amd64.deb ... Unpacking libxcb-render0:amd64 (1.13.1-2) ... Selecting previously unselected package libxcb-shm0:amd64. Preparing to unpack .../028-libxcb-shm0_1.13.1-2_amd64.deb ... Unpacking libxcb-shm0:amd64 (1.13.1-2) ... Selecting previously unselected package libxrender1:amd64. Preparing to unpack .../029-libxrender1_1%3a0.9.10-1_amd64.deb ... Unpacking libxrender1:amd64 (1:0.9.10-1) ... Selecting previously unselected package libcairo2:amd64. Preparing to unpack .../030-libcairo2_1.16.0-4_amd64.deb ... Unpacking libcairo2:amd64 (1.16.0-4) ... Selecting previously unselected package libcroco3:amd64. Preparing to unpack .../031-libcroco3_0.6.12-3_amd64.deb ... Unpacking libcroco3:amd64 (0.6.12-3) ... Selecting previously unselected package fontconfig. Preparing to unpack .../032-fontconfig_2.13.1-2ubuntu2_amd64.deb ... Unpacking fontconfig (2.13.1-2ubuntu2) ... Selecting previously unselected package libthai-data. Preparing to unpack .../033-libthai-data_0.1.28-2_all.deb ... Unpacking libthai-data (0.1.28-2) ... Selecting previously unselected package libdatrie1:amd64. Preparing to unpack .../034-libdatrie1_0.2.12-2_amd64.deb ... Unpacking libdatrie1:amd64 (0.2.12-2) ... Selecting previously unselected package libthai0:amd64. Preparing to unpack .../035-libthai0_0.1.28-2_amd64.deb ... Unpacking libthai0:amd64 (0.1.28-2) ... Selecting previously unselected package libpango-1.0-0:amd64. Preparing to unpack .../036-libpango-1.0-0_1.42.4-6_amd64.deb ... Unpacking libpango-1.0-0:amd64 (1.42.4-6) ... Selecting previously unselected package libgraphite2-3:amd64. Preparing to unpack .../037-libgraphite2-3_1.3.13-7_amd64.deb ... Unpacking libgraphite2-3:amd64 (1.3.13-7) ... Selecting previously unselected package libharfbuzz0b:amd64. Preparing to unpack .../038-libharfbuzz0b_2.4.0-1_amd64.deb ... Unpacking libharfbuzz0b:amd64 (2.4.0-1) ... Selecting previously unselected package libpangoft2-1.0-0:amd64. Preparing to unpack .../039-libpangoft2-1.0-0_1.42.4-6_amd64.deb ... Unpacking libpangoft2-1.0-0:amd64 (1.42.4-6) ... Selecting previously unselected package libpangocairo-1.0-0:amd64. Preparing to unpack .../040-libpangocairo-1.0-0_1.42.4-6_amd64.deb ... Unpacking libpangocairo-1.0-0:amd64 (1.42.4-6) ... Selecting previously unselected package librsvg2-2:amd64. Preparing to unpack .../041-librsvg2-2_2.44.10-2.1_amd64.deb ... Unpacking librsvg2-2:amd64 (2.44.10-2.1) ... Selecting previously unselected package librsvg2-common:amd64. Preparing to unpack .../042-librsvg2-common_2.44.10-2.1_amd64.deb ... Unpacking librsvg2-common:amd64 (2.44.10-2.1) ... Selecting previously unselected package humanity-icon-theme. Preparing to unpack .../043-humanity-icon-theme_0.6.15_all.deb ... Unpacking humanity-icon-theme (0.6.15) ... Selecting previously unselected package ubuntu-mono. Preparing to unpack .../044-ubuntu-mono_19.04-0ubuntu1_all.deb ... Unpacking ubuntu-mono (19.04-0ubuntu1) ... Selecting previously unselected package adwaita-icon-theme. Preparing to unpack .../045-adwaita-icon-theme_3.32.0-1ubuntu1_all.deb ... Unpacking adwaita-icon-theme (3.32.0-1ubuntu1) ... Selecting previously unselected package libsigsegv2:amd64. Preparing to unpack .../046-libsigsegv2_2.12-2_amd64.deb ... Unpacking libsigsegv2:amd64 (2.12-2) ... Selecting previously unselected package m4. Preparing to unpack .../047-m4_1.4.18-2_amd64.deb ... Unpacking m4 (1.4.18-2) ... Selecting previously unselected package autoconf. Preparing to unpack .../048-autoconf_2.69-11_all.deb ... Unpacking autoconf (2.69-11) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../049-autotools-dev_20180224.1_all.deb ... Unpacking autotools-dev (20180224.1) ... Selecting previously unselected package automake. Preparing to unpack .../050-automake_1%3a1.16.1-4ubuntu3_all.deb ... Unpacking automake (1:1.16.1-4ubuntu3) ... Selecting previously unselected package autopoint. Preparing to unpack .../051-autopoint_0.19.8.1-9_all.deb ... Unpacking autopoint (0.19.8.1-9) ... Selecting previously unselected package dbus-user-session. Preparing to unpack .../052-dbus-user-session_1.12.14-1ubuntu2_amd64.deb ... Unpacking dbus-user-session (1.12.14-1ubuntu2) ... Selecting previously unselected package libdconf1:amd64. Preparing to unpack .../053-libdconf1_0.32.0-1_amd64.deb ... Unpacking libdconf1:amd64 (0.32.0-1) ... Selecting previously unselected package dconf-service. Preparing to unpack .../054-dconf-service_0.32.0-1_amd64.deb ... Unpacking dconf-service (0.32.0-1) ... Selecting previously unselected package dconf-gsettings-backend:amd64. Preparing to unpack .../055-dconf-gsettings-backend_0.32.0-1_amd64.deb ... Unpacking dconf-gsettings-backend:amd64 (0.32.0-1) ... Selecting previously unselected package libtool. Preparing to unpack .../056-libtool_2.4.6-10_all.deb ... Unpacking libtool (2.4.6-10) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../057-dh-autoreconf_19_all.deb ... Unpacking dh-autoreconf (19) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../058-libarchive-zip-perl_1.64-1_all.deb ... Unpacking libarchive-zip-perl (1.64-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../059-libfile-stripnondeterminism-perl_1.1.2-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (1.1.2-1) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../060-dh-strip-nondeterminism_1.1.2-1_all.deb ... Unpacking dh-strip-nondeterminism (1.1.2-1) ... Selecting previously unselected package dwz. Preparing to unpack .../061-dwz_0.12.20190703-1_amd64.deb ... Unpacking dwz (0.12.20190703-1) ... Selecting previously unselected package gettext. Preparing to unpack .../062-gettext_0.19.8.1-9_amd64.deb ... Unpacking gettext (0.19.8.1-9) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../063-intltool-debian_0.35.0+20060710.5_all.deb ... Unpacking intltool-debian (0.35.0+20060710.5) ... Selecting previously unselected package po-debconf. Preparing to unpack .../064-po-debconf_1.0.21_all.deb ... Unpacking po-debconf (1.0.21) ... Selecting previously unselected package debhelper. Preparing to unpack .../065-debhelper_12.1.1ubuntu1_all.deb ... Unpacking debhelper (12.1.1ubuntu1) ... Selecting previously unselected package python3-lib2to3. Preparing to unpack .../066-python3-lib2to3_3.7.3-1ubuntu1_all.deb ... Unpacking python3-lib2to3 (3.7.3-1ubuntu1) ... Selecting previously unselected package python3-distutils. Preparing to unpack .../067-python3-distutils_3.7.3-1ubuntu1_all.deb ... Unpacking python3-distutils (3.7.3-1ubuntu1) ... Selecting previously unselected package dh-python. Preparing to unpack .../068-dh-python_3.20190308_all.deb ... Unpacking dh-python (3.20190308) ... Selecting previously unselected package xml-core. Preparing to unpack .../069-xml-core_0.18+nmu1_all.deb ... Unpacking xml-core (0.18+nmu1) ... Selecting previously unselected package docutils-common. Preparing to unpack .../070-docutils-common_0.14+dfsg-4_all.deb ... Unpacking docutils-common (0.14+dfsg-4) ... Selecting previously unselected package libxpm4:amd64. Preparing to unpack .../071-libxpm4_1%3a3.5.12-1_amd64.deb ... Unpacking libxpm4:amd64 (1:3.5.12-1) ... Selecting previously unselected package libgd3:amd64. Preparing to unpack .../072-libgd3_2.2.5-5.2_amd64.deb ... Unpacking libgd3:amd64 (2.2.5-5.2) ... Selecting previously unselected package libkpathsea6:amd64. Preparing to unpack .../073-libkpathsea6_2018.20181218.49446-2_amd64.deb ... Unpacking libkpathsea6:amd64 (2018.20181218.49446-2) ... Selecting previously unselected package libptexenc1:amd64. Preparing to unpack .../074-libptexenc1_2018.20181218.49446-2_amd64.deb ... Unpacking libptexenc1:amd64 (2018.20181218.49446-2) ... Selecting previously unselected package libsynctex2:amd64. Preparing to unpack .../075-libsynctex2_2018.20181218.49446-2_amd64.deb ... Unpacking libsynctex2:amd64 (2018.20181218.49446-2) ... Selecting previously unselected package libtexlua52:amd64. Preparing to unpack .../076-libtexlua52_2018.20181218.49446-2_amd64.deb ... Unpacking libtexlua52:amd64 (2018.20181218.49446-2) ... Selecting previously unselected package libtexlua53:amd64. Preparing to unpack .../077-libtexlua53_2018.20181218.49446-2_amd64.deb ... Unpacking libtexlua53:amd64 (2018.20181218.49446-2) ... Selecting previously unselected package libtexluajit2:amd64. Preparing to unpack .../078-libtexluajit2_2018.20181218.49446-2_amd64.deb ... Unpacking libtexluajit2:amd64 (2018.20181218.49446-2) ... Selecting previously unselected package t1utils. Preparing to unpack .../079-t1utils_1.41-3_amd64.deb ... Unpacking t1utils (1.41-3) ... Selecting previously unselected package libbrotli1:amd64. Preparing to unpack .../080-libbrotli1_1.0.7-2_amd64.deb ... Unpacking libbrotli1:amd64 (1.0.7-2) ... Selecting previously unselected package libavahi-common-data:amd64. Preparing to unpack .../081-libavahi-common-data_0.7-4ubuntu5_amd64.deb ... Unpacking libavahi-common-data:amd64 (0.7-4ubuntu5) ... Selecting previously unselected package libavahi-common3:amd64. Preparing to unpack .../082-libavahi-common3_0.7-4ubuntu5_amd64.deb ... Unpacking libavahi-common3:amd64 (0.7-4ubuntu5) ... Selecting previously unselected package libavahi-client3:amd64. Preparing to unpack .../083-libavahi-client3_0.7-4ubuntu5_amd64.deb ... Unpacking libavahi-client3:amd64 (0.7-4ubuntu5) ... Selecting previously unselected package libcups2:amd64. Preparing to unpack .../084-libcups2_2.2.10-6ubuntu1_amd64.deb ... Unpacking libcups2:amd64 (2.2.10-6ubuntu1) ... Selecting previously unselected package libcupsimage2:amd64. Preparing to unpack .../085-libcupsimage2_2.2.10-6ubuntu1_amd64.deb ... Unpacking libcupsimage2:amd64 (2.2.10-6ubuntu1) ... Selecting previously unselected package libijs-0.35:amd64. Preparing to unpack .../086-libijs-0.35_0.35-14_amd64.deb ... Unpacking libijs-0.35:amd64 (0.35-14) ... Selecting previously unselected package libjbig2dec0:amd64. Preparing to unpack .../087-libjbig2dec0_0.16-1_amd64.deb ... Unpacking libjbig2dec0:amd64 (0.16-1) ... Selecting previously unselected package libpaper1:amd64. Preparing to unpack .../088-libpaper1_1.1.28_amd64.deb ... Unpacking libpaper1:amd64 (1.1.28) ... Selecting previously unselected package libgs9-common. Preparing to unpack .../089-libgs9-common_9.26~dfsg+0-0ubuntu8_all.deb ... Unpacking libgs9-common (9.26~dfsg+0-0ubuntu8) ... Selecting previously unselected package libgs9:amd64. Preparing to unpack .../090-libgs9_9.26~dfsg+0-0ubuntu8_amd64.deb ... Unpacking libgs9:amd64 (9.26~dfsg+0-0ubuntu8) ... Selecting previously unselected package libharfbuzz-icu0:amd64. Preparing to unpack .../091-libharfbuzz-icu0_2.4.0-1_amd64.deb ... Unpacking libharfbuzz-icu0:amd64 (2.4.0-1) ... Selecting previously unselected package libpotrace0:amd64. Preparing to unpack .../092-libpotrace0_1.15-1_amd64.deb ... Unpacking libpotrace0:amd64 (1.15-1) ... Selecting previously unselected package libteckit0:amd64. Preparing to unpack .../093-libteckit0_2.5.8+ds2-5ubuntu1_amd64.deb ... Unpacking libteckit0:amd64 (2.5.8+ds2-5ubuntu1) ... Selecting previously unselected package libwoff1:amd64. Preparing to unpack .../094-libwoff1_1.0.2-1build1_amd64.deb ... Unpacking libwoff1:amd64 (1.0.2-1build1) ... Selecting previously unselected package x11-common. Preparing to unpack .../095-x11-common_1%3a7.7+19ubuntu12_all.deb ... dpkg-query: no packages found matching nux-tools Unpacking x11-common (1:7.7+19ubuntu12) ... Selecting previously unselected package libice6:amd64. Preparing to unpack .../096-libice6_2%3a1.0.9-2_amd64.deb ... Unpacking libice6:amd64 (2:1.0.9-2) ... Selecting previously unselected package libsm6:amd64. Preparing to unpack .../097-libsm6_2%3a1.2.3-1_amd64.deb ... Unpacking libsm6:amd64 (2:1.2.3-1) ... Selecting previously unselected package libxt6:amd64. Preparing to unpack .../098-libxt6_1%3a1.1.5-1_amd64.deb ... Unpacking libxt6:amd64 (1:1.1.5-1) ... Selecting previously unselected package libxmu6:amd64. Preparing to unpack .../099-libxmu6_2%3a1.1.2-2_amd64.deb ... Unpacking libxmu6:amd64 (2:1.1.2-2) ... Selecting previously unselected package libxaw7:amd64. Preparing to unpack .../100-libxaw7_2%3a1.0.13-1_amd64.deb ... Unpacking libxaw7:amd64 (2:1.0.13-1) ... Selecting previously unselected package libxi6:amd64. Preparing to unpack .../101-libxi6_2%3a1.7.9-1_amd64.deb ... Unpacking libxi6:amd64 (2:1.7.9-1) ... Selecting previously unselected package libxxhash0:amd64. Preparing to unpack .../102-libxxhash0_0.6.5-3_amd64.deb ... Unpacking libxxhash0:amd64 (0.6.5-3) ... Selecting previously unselected package libzzip-0-13:amd64. Preparing to unpack .../103-libzzip-0-13_0.13.62-3.2_amd64.deb ... Unpacking libzzip-0-13:amd64 (0.13.62-3.2) ... Selecting previously unselected package texlive-binaries. Preparing to unpack .../104-texlive-binaries_2018.20181218.49446-2_amd64.deb ... Unpacking texlive-binaries (2018.20181218.49446-2) ... Selecting previously unselected package ghostscript. Preparing to unpack .../105-ghostscript_9.26~dfsg+0-0ubuntu8_amd64.deb ... Unpacking ghostscript (9.26~dfsg+0-0ubuntu8) ... Selecting previously unselected package dvipng. Preparing to unpack .../106-dvipng_1.15-1.1_amd64.deb ... Unpacking dvipng (1.15-1.1) ... Selecting previously unselected package fonts-lmodern. Preparing to unpack .../107-fonts-lmodern_2.004.5-6_all.deb ... Unpacking fonts-lmodern (2.004.5-6) ... Selecting previously unselected package libproxy1v5:amd64. Preparing to unpack .../108-libproxy1v5_0.4.15-5_amd64.deb ... Unpacking libproxy1v5:amd64 (0.4.15-5) ... Selecting previously unselected package glib-networking-common. Preparing to unpack .../109-glib-networking-common_2.60.3-1_all.deb ... Unpacking glib-networking-common (2.60.3-1) ... Selecting previously unselected package glib-networking-services. Preparing to unpack .../110-glib-networking-services_2.60.3-1_amd64.deb ... Unpacking glib-networking-services (2.60.3-1) ... Selecting previously unselected package gsettings-desktop-schemas. Preparing to unpack .../111-gsettings-desktop-schemas_3.31.91-1ubuntu1_all.deb ... Unpacking gsettings-desktop-schemas (3.31.91-1ubuntu1) ... Selecting previously unselected package glib-networking:amd64. Preparing to unpack .../112-glib-networking_2.60.3-1_amd64.deb ... Unpacking glib-networking:amd64 (2.60.3-1) ... Selecting previously unselected package libcdt5. Preparing to unpack .../113-libcdt5_2.40.1-6_amd64.deb ... Unpacking libcdt5 (2.40.1-6) ... Selecting previously unselected package libcgraph6. Preparing to unpack .../114-libcgraph6_2.40.1-6_amd64.deb ... Unpacking libcgraph6 (2.40.1-6) ... Selecting previously unselected package libgts-0.7-5:amd64. Preparing to unpack .../115-libgts-0.7-5_0.7.6+darcs121130-4_amd64.deb ... Unpacking libgts-0.7-5:amd64 (0.7.6+darcs121130-4) ... Selecting previously unselected package libpathplan4. Preparing to unpack .../116-libpathplan4_2.40.1-6_amd64.deb ... Unpacking libpathplan4 (2.40.1-6) ... Selecting previously unselected package libgvc6. Preparing to unpack .../117-libgvc6_2.40.1-6_amd64.deb ... Unpacking libgvc6 (2.40.1-6) ... Selecting previously unselected package libgvpr2. Preparing to unpack .../118-libgvpr2_2.40.1-6_amd64.deb ... Unpacking libgvpr2 (2.40.1-6) ... Selecting previously unselected package liblab-gamut1. Preparing to unpack .../119-liblab-gamut1_2.40.1-6_amd64.deb ... Unpacking liblab-gamut1 (2.40.1-6) ... Selecting previously unselected package graphviz. Preparing to unpack .../120-graphviz_2.40.1-6_amd64.deb ... Unpacking graphviz (2.40.1-6) ... Selecting previously unselected package imagemagick-6.q16. Preparing to unpack .../121-imagemagick-6.q16_8%3a6.9.10.23+dfsg-2.1ubuntu3_amd64.deb ... Unpacking imagemagick-6.q16 (8:6.9.10.23+dfsg-2.1ubuntu3) ... Selecting previously unselected package libatk1.0-data. Preparing to unpack .../122-libatk1.0-data_2.32.0-1_all.deb ... Unpacking libatk1.0-data (2.32.0-1) ... Selecting previously unselected package libatk1.0-0:amd64. Preparing to unpack .../123-libatk1.0-0_2.32.0-1_amd64.deb ... Unpacking libatk1.0-0:amd64 (2.32.0-1) ... Selecting previously unselected package libatspi2.0-0:amd64. Preparing to unpack .../124-libatspi2.0-0_2.32.0-1_amd64.deb ... Unpacking libatspi2.0-0:amd64 (2.32.0-1) ... Selecting previously unselected package libatk-bridge2.0-0:amd64. Preparing to unpack .../125-libatk-bridge2.0-0_2.32.0-1_amd64.deb ... Unpacking libatk-bridge2.0-0:amd64 (2.32.0-1) ... Selecting previously unselected package libcairo-gobject2:amd64. Preparing to unpack .../126-libcairo-gobject2_1.16.0-4_amd64.deb ... Unpacking libcairo-gobject2:amd64 (1.16.0-4) ... Selecting previously unselected package libcolord2:amd64. Preparing to unpack .../127-libcolord2_1.4.3-4_amd64.deb ... Unpacking libcolord2:amd64 (1.4.3-4) ... Selecting previously unselected package libepoxy0:amd64. Preparing to unpack .../128-libepoxy0_1.5.3-0.1_amd64.deb ... Unpacking libepoxy0:amd64 (1.5.3-0.1) ... Selecting previously unselected package libjson-glib-1.0-common. Preparing to unpack .../129-libjson-glib-1.0-common_1.4.4-2_all.deb ... Unpacking libjson-glib-1.0-common (1.4.4-2) ... Selecting previously unselected package libjson-glib-1.0-0:amd64. Preparing to unpack .../130-libjson-glib-1.0-0_1.4.4-2_amd64.deb ... Unpacking libjson-glib-1.0-0:amd64 (1.4.4-2) ... Selecting previously unselected package libsoup2.4-1:amd64. Preparing to unpack .../131-libsoup2.4-1_2.66.1-1_amd64.deb ... Unpacking libsoup2.4-1:amd64 (2.66.1-1) ... Selecting previously unselected package libsoup-gnome2.4-1:amd64. Preparing to unpack .../132-libsoup-gnome2.4-1_2.66.1-1_amd64.deb ... Unpacking libsoup-gnome2.4-1:amd64 (2.66.1-1) ... Selecting previously unselected package librest-0.7-0:amd64. Preparing to unpack .../133-librest-0.7-0_0.8.1-1_amd64.deb ... Unpacking librest-0.7-0:amd64 (0.8.1-1) ... Selecting previously unselected package libwayland-client0:amd64. Preparing to unpack .../134-libwayland-client0_1.16.0-1ubuntu2_amd64.deb ... Unpacking libwayland-client0:amd64 (1.16.0-1ubuntu2) ... Selecting previously unselected package libwayland-cursor0:amd64. Preparing to unpack .../135-libwayland-cursor0_1.16.0-1ubuntu2_amd64.deb ... Unpacking libwayland-cursor0:amd64 (1.16.0-1ubuntu2) ... Selecting previously unselected package libwayland-egl1:amd64. Preparing to unpack .../136-libwayland-egl1_1.16.0-1ubuntu2_amd64.deb ... Unpacking libwayland-egl1:amd64 (1.16.0-1ubuntu2) ... Selecting previously unselected package libxcomposite1:amd64. Preparing to unpack .../137-libxcomposite1_1%3a0.4.4-2_amd64.deb ... Unpacking libxcomposite1:amd64 (1:0.4.4-2) ... Selecting previously unselected package libxfixes3:amd64. Preparing to unpack .../138-libxfixes3_1%3a5.0.3-1_amd64.deb ... Unpacking libxfixes3:amd64 (1:5.0.3-1) ... Selecting previously unselected package libxcursor1:amd64. Preparing to unpack .../139-libxcursor1_1%3a1.2.0-1_amd64.deb ... Unpacking libxcursor1:amd64 (1:1.2.0-1) ... Selecting previously unselected package libxdamage1:amd64. Preparing to unpack .../140-libxdamage1_1%3a1.1.4-3_amd64.deb ... Unpacking libxdamage1:amd64 (1:1.1.4-3) ... Selecting previously unselected package libxinerama1:amd64. Preparing to unpack .../141-libxinerama1_2%3a1.1.4-2_amd64.deb ... Unpacking libxinerama1:amd64 (2:1.1.4-2) ... Selecting previously unselected package libxkbcommon0:amd64. Preparing to unpack .../142-libxkbcommon0_0.8.2-1_amd64.deb ... Unpacking libxkbcommon0:amd64 (0.8.2-1) ... Selecting previously unselected package libxrandr2:amd64. Preparing to unpack .../143-libxrandr2_2%3a1.5.1-1_amd64.deb ... Unpacking libxrandr2:amd64 (2:1.5.1-1) ... Selecting previously unselected package libgtk-3-common. Preparing to unpack .../144-libgtk-3-common_3.24.8-1ubuntu1_all.deb ... Unpacking libgtk-3-common (3.24.8-1ubuntu1) ... Selecting previously unselected package libgtk-3-0:amd64. Preparing to unpack .../145-libgtk-3-0_3.24.8-1ubuntu1_amd64.deb ... Unpacking libgtk-3-0:amd64 (3.24.8-1ubuntu1) ... Selecting previously unselected package libjs-jquery. Preparing to unpack .../146-libjs-jquery_3.3.1~dfsg-3_all.deb ... Unpacking libjs-jquery (3.3.1~dfsg-3) ... Selecting previously unselected package libjs-underscore. Preparing to unpack .../147-libjs-underscore_1.9.1~dfsg-1_all.deb ... Unpacking libjs-underscore (1.9.1~dfsg-1) ... Selecting previously unselected package libjs-sphinxdoc. Preparing to unpack .../148-libjs-sphinxdoc_1.8.5-1ubuntu1_all.deb ... Unpacking libjs-sphinxdoc (1.8.5-1ubuntu1) ... Selecting previously unselected package libpaper-utils. Preparing to unpack .../149-libpaper-utils_1.1.28_amd64.deb ... Unpacking libpaper-utils (1.1.28) ... Selecting previously unselected package librsvg2-bin. Preparing to unpack .../150-librsvg2-bin_2.44.10-2.1_amd64.deb ... Unpacking librsvg2-bin (2.44.10-2.1) ... Selecting previously unselected package libstemmer0d:amd64. Preparing to unpack .../151-libstemmer0d_0+svn585-1build1_amd64.deb ... Unpacking libstemmer0d:amd64 (0+svn585-1build1) ... Selecting previously unselected package libtext-unidecode-perl. Preparing to unpack .../152-libtext-unidecode-perl_1.30-1_all.deb ... Unpacking libtext-unidecode-perl (1.30-1) ... Selecting previously unselected package libxml-namespacesupport-perl. Preparing to unpack .../153-libxml-namespacesupport-perl_1.12-1_all.deb ... Unpacking libxml-namespacesupport-perl (1.12-1) ... Selecting previously unselected package libxml-sax-base-perl. Preparing to unpack .../154-libxml-sax-base-perl_1.09-1_all.deb ... Unpacking libxml-sax-base-perl (1.09-1) ... Selecting previously unselected package libxml-sax-perl. Preparing to unpack .../155-libxml-sax-perl_1.00+dfsg-1.1~build1_all.deb ... Unpacking libxml-sax-perl (1.00+dfsg-1.1~build1) ... Selecting previously unselected package libxml-libxml-perl. Preparing to unpack .../156-libxml-libxml-perl_2.0134+dfsg-1_amd64.deb ... Unpacking libxml-libxml-perl (2.0134+dfsg-1) ... Selecting previously unselected package preview-latex-style. Preparing to unpack .../157-preview-latex-style_11.91-1ubuntu1_all.deb ... Unpacking preview-latex-style (11.91-1ubuntu1) ... Selecting previously unselected package python-all. Preparing to unpack .../158-python-all_2.7.16-1_amd64.deb ... Unpacking python-all (2.7.16-1) ... Selecting previously unselected package python-atomicwrites. Preparing to unpack .../159-python-atomicwrites_1.1.5-2_all.deb ... Unpacking python-atomicwrites (1.1.5-2) ... Selecting previously unselected package python-attr. Preparing to unpack .../160-python-attr_18.2.0-1_all.deb ... Unpacking python-attr (18.2.0-1) ... Selecting previously unselected package python-babel-localedata. Preparing to unpack .../161-python-babel-localedata_2.6.0+dfsg.1-1_all.deb ... Unpacking python-babel-localedata (2.6.0+dfsg.1-1) ... Selecting previously unselected package python-pkg-resources. Preparing to unpack .../162-python-pkg-resources_41.0.1-1_all.deb ... Unpacking python-pkg-resources (41.0.1-1) ... Selecting previously unselected package python-tz. Preparing to unpack .../163-python-tz_2019.1-1_all.deb ... Unpacking python-tz (2019.1-1) ... Selecting previously unselected package python-babel. Preparing to unpack .../164-python-babel_2.6.0+dfsg.1-1_all.deb ... Unpacking python-babel (2.6.0+dfsg.1-1) ... Selecting previously unselected package python-certifi. Preparing to unpack .../165-python-certifi_2018.8.24-1_all.deb ... Unpacking python-certifi (2018.8.24-1) ... Selecting previously unselected package python-chardet. Preparing to unpack .../166-python-chardet_3.0.4-3_all.deb ... Unpacking python-chardet (3.0.4-3) ... Selecting previously unselected package python-roman. Preparing to unpack .../167-python-roman_2.0.0-3_all.deb ... Unpacking python-roman (2.0.0-3) ... Selecting previously unselected package python-docutils. Preparing to unpack .../168-python-docutils_0.14+dfsg-4_all.deb ... Unpacking python-docutils (0.14+dfsg-4) ... Selecting previously unselected package python-enum34. Preparing to unpack .../169-python-enum34_1.1.6-2_all.deb ... Unpacking python-enum34 (1.1.6-2) ... Selecting previously unselected package python-funcsigs. Preparing to unpack .../170-python-funcsigs_1.0.2-4_all.deb ... Unpacking python-funcsigs (1.0.2-4) ... Selecting previously unselected package python-six. Preparing to unpack .../171-python-six_1.12.0-1_all.deb ... Unpacking python-six (1.12.0-1) ... Selecting previously unselected package python-webencodings. Preparing to unpack .../172-python-webencodings_0.5.1-1_all.deb ... Unpacking python-webencodings (0.5.1-1) ... Selecting previously unselected package python-html5lib. Preparing to unpack .../173-python-html5lib_1.0.1-1_all.deb ... Unpacking python-html5lib (1.0.1-1) ... Selecting previously unselected package python-idna. Preparing to unpack .../174-python-idna_2.6-1_all.deb ... Unpacking python-idna (2.6-1) ... Selecting previously unselected package python-imagesize. Preparing to unpack .../175-python-imagesize_1.0.0-1_all.deb ... Unpacking python-imagesize (1.0.0-1) ... Selecting previously unselected package python-markupsafe. Preparing to unpack .../176-python-markupsafe_1.1.0-1_amd64.deb ... Unpacking python-markupsafe (1.1.0-1) ... Selecting previously unselected package python-jinja2. Preparing to unpack .../177-python-jinja2_2.10-2ubuntu1_all.deb ... Unpacking python-jinja2 (2.10-2ubuntu1) ... Selecting previously unselected package python-more-itertools. Preparing to unpack .../178-python-more-itertools_4.2.0-1_all.deb ... Unpacking python-more-itertools (4.2.0-1) ... Selecting previously unselected package python-pyparsing. Preparing to unpack .../179-python-pyparsing_2.2.0+dfsg1-2_all.deb ... Unpacking python-pyparsing (2.2.0+dfsg1-2) ... Selecting previously unselected package python-packaging. Preparing to unpack .../180-python-packaging_19.0-1_all.deb ... Unpacking python-packaging (19.0-1) ... Selecting previously unselected package python-scandir. Preparing to unpack .../181-python-scandir_1.10.0-1_amd64.deb ... Unpacking python-scandir (1.10.0-1) ... Selecting previously unselected package python-pathlib2. Preparing to unpack .../182-python-pathlib2_2.3.3-1_all.deb ... Unpacking python-pathlib2 (2.3.3-1) ... Selecting previously unselected package python-pluggy. Preparing to unpack .../183-python-pluggy_0.8.0-1_all.deb ... Unpacking python-pluggy (0.8.0-1) ... Selecting previously unselected package python-py. Preparing to unpack .../184-python-py_1.7.0-2_all.deb ... Unpacking python-py (1.7.0-2) ... Selecting previously unselected package python-pygments. Preparing to unpack .../185-python-pygments_2.3.1+dfsg-1ubuntu1_all.deb ... Unpacking python-pygments (2.3.1+dfsg-1ubuntu1) ... Selecting previously unselected package python-pytest. Preparing to unpack .../186-python-pytest_3.10.1-2_all.deb ... Unpacking python-pytest (3.10.1-2) ... Selecting previously unselected package python-urllib3. Preparing to unpack .../187-python-urllib3_1.24.1-1ubuntu1_all.deb ... Unpacking python-urllib3 (1.24.1-1ubuntu1) ... Selecting previously unselected package python-requests. Preparing to unpack .../188-python-requests_2.21.0-1_all.deb ... Unpacking python-requests (2.21.0-1) ... Selecting previously unselected package python-setuptools. Preparing to unpack .../189-python-setuptools_41.0.1-1_all.deb ... Unpacking python-setuptools (41.0.1-1) ... Selecting previously unselected package python-stemmer. Preparing to unpack .../190-python-stemmer_1.3.0+dfsg-1build9_amd64.deb ... Unpacking python-stemmer (1.3.0+dfsg-1build9) ... Selecting previously unselected package python-typing. Preparing to unpack .../191-python-typing_3.6.6-1_all.deb ... Unpacking python-typing (3.6.6-1) ... Selecting previously unselected package python3-all. Preparing to unpack .../192-python3-all_3.7.3-1_amd64.deb ... Unpacking python3-all (3.7.3-1) ... Selecting previously unselected package python3-atomicwrites. Preparing to unpack .../193-python3-atomicwrites_1.1.5-2_all.deb ... Unpacking python3-atomicwrites (1.1.5-2) ... Selecting previously unselected package python3-attr. Preparing to unpack .../194-python3-attr_18.2.0-1_all.deb ... Unpacking python3-attr (18.2.0-1) ... Selecting previously unselected package python3-tz. Preparing to unpack .../195-python3-tz_2019.1-1_all.deb ... Unpacking python3-tz (2019.1-1) ... Selecting previously unselected package python3-babel. Preparing to unpack .../196-python3-babel_2.6.0+dfsg.1-1_all.deb ... Unpacking python3-babel (2.6.0+dfsg.1-1) ... Selecting previously unselected package python3-certifi. Preparing to unpack .../197-python3-certifi_2018.8.24-1_all.deb ... Unpacking python3-certifi (2018.8.24-1) ... Selecting previously unselected package python3-chardet. Preparing to unpack .../198-python3-chardet_3.0.4-3_all.deb ... Unpacking python3-chardet (3.0.4-3) ... Selecting previously unselected package python3-roman. Preparing to unpack .../199-python3-roman_2.0.0-3_all.deb ... Unpacking python3-roman (2.0.0-3) ... Selecting previously unselected package python3-docutils. Preparing to unpack .../200-python3-docutils_0.14+dfsg-4_all.deb ... Unpacking python3-docutils (0.14+dfsg-4) ... Selecting previously unselected package python3-webencodings. Preparing to unpack .../201-python3-webencodings_0.5.1-1_all.deb ... Unpacking python3-webencodings (0.5.1-1) ... Selecting previously unselected package python3-html5lib. Preparing to unpack .../202-python3-html5lib_1.0.1-1_all.deb ... Unpacking python3-html5lib (1.0.1-1) ... Selecting previously unselected package python3-idna. Preparing to unpack .../203-python3-idna_2.6-1_all.deb ... Unpacking python3-idna (2.6-1) ... Selecting previously unselected package python3-imagesize. Preparing to unpack .../204-python3-imagesize_1.0.0-1_all.deb ... Unpacking python3-imagesize (1.0.0-1) ... Selecting previously unselected package python3-markupsafe. Preparing to unpack .../205-python3-markupsafe_1.1.0-1_amd64.deb ... Unpacking python3-markupsafe (1.1.0-1) ... Selecting previously unselected package python3-jinja2. Preparing to unpack .../206-python3-jinja2_2.10-2ubuntu1_all.deb ... Unpacking python3-jinja2 (2.10-2ubuntu1) ... Selecting previously unselected package python3-more-itertools. Preparing to unpack .../207-python3-more-itertools_4.2.0-1_all.deb ... Unpacking python3-more-itertools (4.2.0-1) ... Selecting previously unselected package python3-pyparsing. Preparing to unpack .../208-python3-pyparsing_2.2.0+dfsg1-2_all.deb ... Unpacking python3-pyparsing (2.2.0+dfsg1-2) ... Selecting previously unselected package python3-packaging. Preparing to unpack .../209-python3-packaging_19.0-1_all.deb ... Unpacking python3-packaging (19.0-1) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../210-python3-setuptools_41.0.1-1_all.deb ... Unpacking python3-setuptools (41.0.1-1) ... Selecting previously unselected package python3-pbr. Preparing to unpack .../211-python3-pbr_5.1.1-0ubuntu2_all.deb ... Unpacking python3-pbr (5.1.1-0ubuntu2) ... Selecting previously unselected package python3-pluggy. Preparing to unpack .../212-python3-pluggy_0.8.0-1_all.deb ... Unpacking python3-pluggy (0.8.0-1) ... Selecting previously unselected package python3-py. Preparing to unpack .../213-python3-py_1.7.0-2_all.deb ... Unpacking python3-py (1.7.0-2) ... Selecting previously unselected package python3-pygments. Preparing to unpack .../214-python3-pygments_2.3.1+dfsg-1ubuntu1_all.deb ... Unpacking python3-pygments (2.3.1+dfsg-1ubuntu1) ... Selecting previously unselected package python3-pytest. Preparing to unpack .../215-python3-pytest_3.10.1-2_all.deb ... Unpacking python3-pytest (3.10.1-2) ... Selecting previously unselected package python3-urllib3. Preparing to unpack .../216-python3-urllib3_1.24.1-1ubuntu1_all.deb ... Unpacking python3-urllib3 (1.24.1-1ubuntu1) ... Selecting previously unselected package python3-requests. Preparing to unpack .../217-python3-requests_2.21.0-1_all.deb ... Unpacking python3-requests (2.21.0-1) ... Selecting previously unselected package sphinx-common. Preparing to unpack .../218-sphinx-common_1.8.5-1ubuntu1_all.deb ... Unpacking sphinx-common (1.8.5-1ubuntu1) ... Selecting previously unselected package python3-alabaster. Preparing to unpack .../219-python3-alabaster_0.7.8-1_all.deb ... Unpacking python3-alabaster (0.7.8-1) ... Selecting previously unselected package python3-sphinx. Preparing to unpack .../220-python3-sphinx_1.8.5-1ubuntu1_all.deb ... Unpacking python3-sphinx (1.8.5-1ubuntu1) ... Selecting previously unselected package python3-sphinxcontrib.websupport. Preparing to unpack .../221-python3-sphinxcontrib.websupport_1.1.0-2_all.deb ... Unpacking python3-sphinxcontrib.websupport (1.1.0-2) ... Selecting previously unselected package python3-stemmer. Preparing to unpack .../222-python3-stemmer_1.3.0+dfsg-1build9_amd64.deb ... Unpacking python3-stemmer (1.3.0+dfsg-1build9) ... Selecting previously unselected package teckit. Preparing to unpack .../223-teckit_2.5.8+ds2-5ubuntu1_amd64.deb ... Unpacking teckit (2.5.8+ds2-5ubuntu1) ... Selecting previously unselected package texinfo. Preparing to unpack .../224-texinfo_6.5.0.dfsg.1-5_amd64.deb ... Unpacking texinfo (6.5.0.dfsg.1-5) ... Selecting previously unselected package xdg-utils. Preparing to unpack .../225-xdg-utils_1.1.3-1ubuntu2_all.deb ... Unpacking xdg-utils (1.1.3-1ubuntu2) ... Selecting previously unselected package texlive-base. Preparing to unpack .../226-texlive-base_2018.20190227-2_all.deb ... Unpacking texlive-base (2018.20190227-2) ... Selecting previously unselected package texlive-fonts-recommended. Preparing to unpack .../227-texlive-fonts-recommended_2018.20190227-2_all.deb ... Unpacking texlive-fonts-recommended (2018.20190227-2) ... Selecting previously unselected package texlive-latex-base. Preparing to unpack .../228-texlive-latex-base_2018.20190227-2_all.deb ... Unpacking texlive-latex-base (2018.20190227-2) ... Selecting previously unselected package texlive-latex-recommended. Preparing to unpack .../229-texlive-latex-recommended_2018.20190227-2_all.deb ... Unpacking texlive-latex-recommended (2018.20190227-2) ... Selecting previously unselected package texlive-pictures. Preparing to unpack .../230-texlive-pictures_2018.20190227-2_all.deb ... Unpacking texlive-pictures (2018.20190227-2) ... Selecting previously unselected package texlive-latex-extra. Preparing to unpack .../231-texlive-latex-extra_2018.20190227-2_all.deb ... Unpacking texlive-latex-extra (2018.20190227-2) ... Selecting previously unselected package texlive-luatex. Preparing to unpack .../232-texlive-luatex_2018.20190227-2_all.deb ... Unpacking texlive-luatex (2018.20190227-2) ... Selecting previously unselected package tipa. Preparing to unpack .../233-tipa_2%3a1.3-20_all.deb ... Unpacking tipa (2:1.3-20) ... Selecting previously unselected package texlive-xetex. Preparing to unpack .../234-texlive-xetex_2018.20190227-2_all.deb ... Unpacking texlive-xetex (2018.20190227-2) ... Selecting previously unselected package python-alabaster. Preparing to unpack .../235-python-alabaster_0.7.8-1_all.deb ... Unpacking python-alabaster (0.7.8-1) ... Selecting previously unselected package python-pbr. Preparing to unpack .../236-python-pbr_5.1.1-0ubuntu2_all.deb ... Unpacking python-pbr (5.1.1-0ubuntu2) ... Selecting previously unselected package python-mock. Preparing to unpack .../237-python-mock_2.0.0-4_all.deb ... Unpacking python-mock (2.0.0-4) ... Selecting previously unselected package python3-mock. Preparing to unpack .../238-python3-mock_2.0.0-4_all.deb ... Unpacking python3-mock (2.0.0-4) ... Selecting previously unselected package sbuild-build-depends-sphinx-dummy. Preparing to unpack .../239-sbuild-build-depends-sphinx-dummy_0.invalid.0_amd64.deb ... Unpacking sbuild-build-depends-sphinx-dummy (0.invalid.0) ... Setting up libgs9-common (9.26~dfsg+0-0ubuntu8) ... Setting up libpipeline1:amd64 (1.5.1-2) ... Setting up libgraphite2-3:amd64 (1.3.13-7) ... Setting up liblcms2-2:amd64 (2.9-3) ... Setting up libpixman-1-0:amd64 (0.36.0-1) ... Setting up libxau6:amd64 (1:1.0.8-1) ... Setting up imagemagick-6-common (8:6.9.10.23+dfsg-2.1ubuntu3) ... Setting up libkeyutils1:amd64 (1.6-6) ... Setting up libproxy1v5:amd64 (0.4.15-5) ... Setting up libpsl5:amd64 (0.20.2-2) ... Setting up mime-support (3.62ubuntu1) ... Setting up libtexlua52:amd64 (2018.20181218.49446-2) ... Setting up hicolor-icon-theme (0.17-2) ... Setting up libdatrie1:amd64 (0.2.12-2) ... Setting up libmagic-mgc (1:5.35-4) ... Setting up libtexlua53:amd64 (2018.20181218.49446-2) ... Setting up libarchive-zip-perl (1.64-1) ... Setting up libglib2.0-0:amd64 (2.60.4-1) ... Setting up libijs-0.35:amd64 (0.35-14) ... Setting up libtexluajit2:amd64 (2018.20181218.49446-2) ... Setting up libbrotli1:amd64 (1.0.7-2) ... Setting up liblab-gamut1 (2.40.1-6) ... Setting up libgdk-pixbuf2.0-common (2.38.1+dfsg-1) ... Setting up x11-common (1:7.7+19ubuntu12) ... update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults Running in chroot, ignoring request. invoke-rc.d: policy-rc.d denied execution of start. Setting up libmagic1:amd64 (1:5.35-4) ... Setting up libxml-namespacesupport-perl (1.12-1) ... Setting up gettext-base (0.19.8.1-9) ... Setting up xkb-data (2.26-2ubuntu1) ... Setting up libzzip-0-13:amd64 (0.13.62-3.2) ... Setting up file (1:5.35-4) ... Setting up libjbig0:amd64 (2.1-3.1build1) ... Setting up libcolord2:amd64 (1.4.3-4) ... Setting up libicu63:amd64 (63.2-2) ... Setting up python-babel-localedata (2.6.0+dfsg.1-1) ... Setting up poppler-data (0.4.9-2) ... Setting up libkrb5support0:amd64 (1.17-3) ... Setting up libpython2.7-stdlib:amd64 (2.7.16-2) ... Setting up libdconf1:amd64 (0.32.0-1) ... Setting up libgts-0.7-5:amd64 (0.7.6+darcs121130-4) ... Setting up libxml-sax-base-perl (1.09-1) ... Setting up autotools-dev (20180224.1) ... Setting up libfreetype6:amd64 (2.9.1-3) ... Setting up libx11-data (2:1.6.7-1) ... Setting up libepoxy0:amd64 (1.5.3-0.1) ... Setting up libjbig2dec0:amd64 (0.16-1) ... Setting up libteckit0:amd64 (2.5.8+ds2-5ubuntu1) ... Setting up libpathplan4 (2.40.1-6) ... Setting up libavahi-common-data:amd64 (0.7-4ubuntu5) ... Setting up libdbus-1-3:amd64 (1.12.14-1ubuntu2) ... Setting up dbus (1.12.14-1ubuntu2) ... Setting up libsigsegv2:amd64 (2.12-2) ... Setting up libfribidi0:amd64 (1.0.5-3.1) ... Setting up t1utils (1.41-3) ... Setting up autopoint (0.19.8.1-9) ... Setting up libwebp6:amd64 (0.6.1-2) ... Setting up fonts-dejavu-core (2.37-1) ... Setting up ucf (3.0038+nmu1) ... Setting up libk5crypto3:amd64 (1.17-3) ... Setting up libjpeg-turbo8:amd64 (2.0.1-0ubuntu2) ... Setting up libltdl7:amd64 (2.4.6-10) ... Setting up libfftw3-double3:amd64 (3.3.8-2) ... Setting up libkpathsea6:amd64 (2018.20181218.49446-2) ... Setting up libatk1.0-data (2.32.0-1) ... Setting up liblqr-1-0:amd64 (0.4.2-2.1) ... Setting up libxxhash0:amd64 (0.6.5-3) ... Setting up libuchardet0:amd64 (0.0.6-3) ... Setting up libpam-systemd:amd64 (240-6ubuntu9) ... Setting up fonts-lmodern (2.004.5-6) ... Setting up libharfbuzz0b:amd64 (2.4.0-1) ... Setting up libthai-data (0.1.28-2) ... Setting up libjson-glib-1.0-common (1.4.4-2) ... Setting up sgml-base (1.29) ... Setting up libcdt5 (2.40.1-6) ... Setting up libatk1.0-0:amd64 (2.32.0-1) ... Setting up libkrb5-3:amd64 (1.17-3) ... Setting up libcgraph6 (2.40.1-6) ... Setting up libwayland-egl1:amd64 (1.16.0-1ubuntu2) ... Setting up libstemmer0d:amd64 (0+svn585-1build1) ... Setting up libmpdec2:amd64 (2.4.2-2) ... Setting up libjs-jquery (3.3.1~dfsg-3) ... Setting up glib-networking-common (2.60.3-1) ... Setting up libtext-unidecode-perl (1.30-1) ... Setting up libwebpmux3:amd64 (0.6.1-2) ... Setting up libbsd0:amd64 (0.9.1-2) ... Setting up libelf1:amd64 (0.176-1.1) ... Setting up libxml2:amd64 (2.9.4+dfsg1-7ubuntu3) ... Setting up xdg-utils (1.1.3-1ubuntu2) ... Setting up libsynctex2:amd64 (2018.20181218.49446-2) ... Setting up libjs-underscore (1.9.1~dfsg-1) ... Setting up libxkbcommon0:amd64 (0.8.2-1) ... Setting up libpotrace0:amd64 (1.15-1) ... Setting up libwayland-client0:amd64 (1.16.0-1ubuntu2) ... Setting up libjpeg8:amd64 (8c-2ubuntu8) ... Setting up teckit (2.5.8+ds2-5ubuntu1) ... Setting up libfile-stripnondeterminism-perl (1.1.2-1) ... Setting up glib-networking-services (2.60.3-1) ... Setting up libpaper1:amd64 (1.1.28) ... Creating config file /etc/papersize with new version Setting up libice6:amd64 (2:1.0.9-2) ... Setting up libxdmcp6:amd64 (1:1.1.2-3) ... Setting up libpython3.7-stdlib:amd64 (3.7.4~rc2-1) ... Setting up libxcb1:amd64 (1.13.1-2) ... Setting up libharfbuzz-icu0:amd64 (2.4.0-1) ... Setting up python2.7 (2.7.16-2) ... Setting up libwoff1:amd64 (1.0.2-1build1) ... Setting up libtool (2.4.6-10) ... Setting up libpython2-stdlib:amd64 (2.7.16-1) ... Setting up libxcb-render0:amd64 (1.13.1-2) ... Setting up fontconfig-config (2.13.1-2ubuntu2) ... Setting up libavahi-common3:amd64 (0.7-4ubuntu5) ... Setting up m4 (1.4.18-2) ... Setting up libxcb-shm0:amd64 (1.13.1-2) ... Setting up libpaper-utils (1.1.28) ... Setting up libxml-sax-perl (1.00+dfsg-1.1~build1) ... update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version Setting up python2 (2.7.16-1) ... Setting up libjson-glib-1.0-0:amd64 (1.4.4-2) ... Setting up tex-common (6.11) ... update-language: texlive-base not installed and configured, doing nothing! Setting up libthai0:amd64 (0.1.28-2) ... Setting up libpython-stdlib:amd64 (2.7.16-1) ... Setting up dbus-user-session (1.12.14-1ubuntu2) ... Setting up libptexenc1:amd64 (2018.20181218.49446-2) ... Setting up shared-mime-info (1.10-1) ... Setting up bsdmainutils (11.1.2ubuntu2) ... update-alternatives: using /usr/bin/bsd-write to provide /usr/bin/write (write) in auto mode update-alternatives: using /usr/bin/bsd-from to provide /usr/bin/from (from) in auto mode Setting up libgssapi-krb5-2:amd64 (1.17-3) ... Setting up libcroco3:amd64 (0.6.12-3) ... Setting up libjs-sphinxdoc (1.8.5-1ubuntu1) ... Setting up autoconf (2.69-11) ... Setting up libxml-libxml-perl (2.0134+dfsg-1) ... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version Setting up libgvpr2 (2.40.1-6) ... Setting up dwz (0.12.20190703-1) ... Setting up groff-base (1.22.4-3) ... Setting up libwayland-cursor0:amd64 (1.16.0-1ubuntu2) ... Setting up xml-core (0.18+nmu1) ... Setting up libx11-6:amd64 (2:1.6.7-1) ... Setting up libtiff5:amd64 (4.0.10-4) ... Setting up libfontconfig1:amd64 (2.13.1-2ubuntu2) ... Setting up libxcomposite1:amd64 (1:0.4.4-2) ... Setting up libsm6:amd64 (2:1.2.3-1) ... Setting up python (2.7.16-1) ... Setting up libavahi-client3:amd64 (0.7-4ubuntu5) ... Setting up libpython3-stdlib:amd64 (3.7.3-1) ... Setting up automake (1:1.16.1-4ubuntu3) ... update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode Setting up python-enum34 (1.1.6-2) ... Setting up python3.7 (3.7.4~rc2-1) ... Setting up fontconfig (2.13.1-2ubuntu2) ... Regenerating fonts cache... done. Setting up gettext (0.19.8.1-9) ... Setting up libxdamage1:amd64 (1:1.1.4-3) ... Setting up libxpm4:amd64 (1:3.5.12-1) ... Setting up libxrender1:amd64 (1:0.9.10-1) ... Setting up python-typing (3.6.6-1) ... Setting up python-pkg-resources (41.0.1-1) ... Setting up preview-latex-style (11.91-1ubuntu1) ... Setting up libpango-1.0-0:amd64 (1.42.4-6) ... Setting up libxext6:amd64 (2:1.3.3-1) ... Setting up dconf-service (0.32.0-1) ... Setting up python3 (3.7.3-1) ... Setting up python-all (2.7.16-1) ... Setting up libatspi2.0-0:amd64 (2.32.0-1) ... Setting up python-attr (18.2.0-1) ... Setting up man-db (2.8.5-2) ... Not building database; man-db/auto-update is not 'true'. Created symlink /etc/systemd/system/timers.target.wants/man-db.timer → /lib/systemd/system/man-db.timer. Setting up python3-markupsafe (1.1.0-1) ... Setting up python3-webencodings (0.5.1-1) ... Setting up python-certifi (2018.8.24-1) ... Setting up python-pygments (2.3.1+dfsg-1ubuntu1) ... Setting up libcairo2:amd64 (1.16.0-4) ... Setting up python3-tz (2019.1-1) ... Setting up python-atomicwrites (1.1.5-2) ... Setting up python3-atomicwrites (1.1.5-2) ... Setting up intltool-debian (0.35.0+20060710.5) ... Setting up python-six (1.12.0-1) ... Setting up python3-six (1.12.0-1) ... Setting up libatk-bridge2.0-0:amd64 (2.32.0-1) ... Setting up python-pyparsing (2.2.0+dfsg1-2) ... Setting up python-more-itertools (4.2.0-1) ... Setting up libmagickcore-6.q16-6:amd64 (8:6.9.10.23+dfsg-2.1ubuntu3) ... Setting up python3-roman (2.0.0-3) ... Setting up python3-jinja2 (2.10-2ubuntu1) ... Setting up python3-pygments (2.3.1+dfsg-1ubuntu1) ... Setting up python3-pyparsing (2.2.0+dfsg1-2) ... Setting up python3-certifi (2018.8.24-1) ... Setting up python-imagesize (1.0.0-1) ... Setting up libxfixes3:amd64 (1:5.0.3-1) ... Setting up python-pluggy (0.8.0-1) ... Setting up python-idna (2.6-1) ... Setting up libgdk-pixbuf2.0-0:amd64 (2.38.1+dfsg-1) ... Setting up sphinx-common (1.8.5-1ubuntu1) ... Setting up libxinerama1:amd64 (2:1.1.4-2) ... Setting up libgd3:amd64 (2.2.5-5.2) ... Setting up python3-idna (2.6-1) ... Setting up libxrandr2:amd64 (2:1.5.1-1) ... Setting up python-setuptools (41.0.1-1) ... Setting up libxt6:amd64 (1:1.1.5-1) ... Setting up texinfo (6.5.0.dfsg.1-5) ... Running mktexlsr. This may take some time. ... done. Setting up python3-html5lib (1.0.1-1) ... Setting up python-markupsafe (1.1.0-1) ... Setting up python3-urllib3 (1.24.1-1ubuntu1) ... Setting up python3-pluggy (0.8.0-1) ... Setting up python3-stemmer (1.3.0+dfsg-1build9) ... Setting up libcups2:amd64 (2.2.10-6ubuntu1) ... Setting up python-roman (2.0.0-3) ... Setting up python-funcsigs (1.0.2-4) ... Setting up python-tz (2019.1-1) ... Setting up python-scandir (1.10.0-1) ... Setting up python-alabaster (0.7.8-1) ... Setting up libmagickwand-6.q16-6:amd64 (8:6.9.10.23+dfsg-2.1ubuntu3) ... Setting up python-chardet (3.0.4-3) ... Setting up libcairo-gobject2:amd64 (1.16.0-4) ... Setting up python-babel (2.6.0+dfsg.1-1) ... update-alternatives: using /usr/bin/pybabel-python2 to provide /usr/bin/pybabel (pybabel) in auto mode Setting up python-stemmer (1.3.0+dfsg-1build9) ... Setting up python-webencodings (0.5.1-1) ... Setting up python-pbr (5.1.1-0ubuntu2) ... update-alternatives: using /usr/bin/python2-pbr to provide /usr/bin/pbr (pbr) in auto mode Setting up libpangoft2-1.0-0:amd64 (1.42.4-6) ... Setting up python3-lib2to3 (3.7.3-1ubuntu1) ... Setting up python-py (1.7.0-2) ... Setting up libpangocairo-1.0-0:amd64 (1.42.4-6) ... Setting up python3-imagesize (1.0.0-1) ... Setting up python-packaging (19.0-1) ... Setting up python3-pkg-resources (41.0.1-1) ... Setting up python3-distutils (3.7.3-1ubuntu1) ... Setting up dh-python (3.20190308) ... Setting up python3-more-itertools (4.2.0-1) ... Setting up python3-attr (18.2.0-1) ... Setting up gtk-update-icon-cache (3.24.8-1ubuntu1) ... Setting up python-urllib3 (1.24.1-1ubuntu1) ... Setting up libxmu6:amd64 (2:1.1.2-2) ... Setting up python3-setuptools (41.0.1-1) ... Setting up libxi6:amd64 (2:1.7.9-1) ... Setting up dconf-gsettings-backend:amd64 (0.32.0-1) ... Setting up python3-py (1.7.0-2) ... Setting up python3-babel (2.6.0+dfsg.1-1) ... Setting up python-html5lib (1.0.1-1) ... Setting up python3-pbr (5.1.1-0ubuntu2) ... Setting up python3-pytest (3.10.1-2) ... Setting up python3-alabaster (0.7.8-1) ... Setting up po-debconf (1.0.21) ... Setting up libxcursor1:amd64 (1:1.2.0-1) ... Setting up python-pathlib2 (2.3.3-1) ... Setting up python3-all (3.7.3-1) ... Setting up libxaw7:amd64 (2:1.0.13-1) ... Setting up python-jinja2 (2.10-2ubuntu1) ... Setting up libcupsimage2:amd64 (2.2.10-6ubuntu1) ... Setting up python3-mock (2.0.0-4) ... Setting up librsvg2-2:amd64 (2.44.10-2.1) ... Setting up python-mock (2.0.0-4) ... Setting up python3-packaging (19.0-1) ... Setting up python3-chardet (3.0.4-3) ... Setting up python-pytest (3.10.1-2) ... Setting up python3-requests (2.21.0-1) ... Setting up libgvc6 (2.40.1-6) ... Setting up librsvg2-common:amd64 (2.44.10-2.1) ... Setting up imagemagick-6.q16 (8:6.9.10.23+dfsg-2.1ubuntu3) ... update-alternatives: using /usr/bin/compare-im6.q16 to provide /usr/bin/compare (compare) in auto mode update-alternatives: using /usr/bin/compare-im6.q16 to provide /usr/bin/compare-im6 (compare-im6) in auto mode update-alternatives: using /usr/bin/animate-im6.q16 to provide /usr/bin/animate (animate) in auto mode update-alternatives: using /usr/bin/animate-im6.q16 to provide /usr/bin/animate-im6 (animate-im6) in auto mode update-alternatives: using /usr/bin/convert-im6.q16 to provide /usr/bin/convert (convert) in auto mode update-alternatives: using /usr/bin/convert-im6.q16 to provide /usr/bin/convert-im6 (convert-im6) in auto mode update-alternatives: using /usr/bin/composite-im6.q16 to provide /usr/bin/composite (composite) in auto mode update-alternatives: using /usr/bin/composite-im6.q16 to provide /usr/bin/composite-im6 (composite-im6) in auto mode update-alternatives: using /usr/bin/conjure-im6.q16 to provide /usr/bin/conjure (conjure) in auto mode update-alternatives: using /usr/bin/conjure-im6.q16 to provide /usr/bin/conjure-im6 (conjure-im6) in auto mode update-alternatives: using /usr/bin/import-im6.q16 to provide /usr/bin/import (import) in auto mode update-alternatives: using /usr/bin/import-im6.q16 to provide /usr/bin/import-im6 (import-im6) in auto mode update-alternatives: using /usr/bin/identify-im6.q16 to provide /usr/bin/identify (identify) in auto mode update-alternatives: using /usr/bin/identify-im6.q16 to provide /usr/bin/identify-im6 (identify-im6) in auto mode update-alternatives: using /usr/bin/stream-im6.q16 to provide /usr/bin/stream (stream) in auto mode update-alternatives: using /usr/bin/stream-im6.q16 to provide /usr/bin/stream-im6 (stream-im6) in auto mode update-alternatives: using /usr/bin/display-im6.q16 to provide /usr/bin/display (display) in auto mode update-alternatives: using /usr/bin/display-im6.q16 to provide /usr/bin/display-im6 (display-im6) in auto mode update-alternatives: using /usr/bin/montage-im6.q16 to provide /usr/bin/montage (montage) in auto mode update-alternatives: using /usr/bin/montage-im6.q16 to provide /usr/bin/montage-im6 (montage-im6) in auto mode update-alternatives: using /usr/bin/mogrify-im6.q16 to provide /usr/bin/mogrify (mogrify) in auto mode update-alternatives: using /usr/bin/mogrify-im6.q16 to provide /usr/bin/mogrify-im6 (mogrify-im6) in auto mode Setting up python-requests (2.21.0-1) ... Setting up libgtk-3-common (3.24.8-1ubuntu1) ... Setting up gsettings-desktop-schemas (3.31.91-1ubuntu1) ... Setting up graphviz (2.40.1-6) ... Setting up libgs9:amd64 (9.26~dfsg+0-0ubuntu8) ... Setting up ghostscript (9.26~dfsg+0-0ubuntu8) ... Setting up texlive-binaries (2018.20181218.49446-2) ... update-alternatives: using /usr/bin/xdvi-xaw to provide /usr/bin/xdvi.bin (xdvi.bin) in auto mode update-alternatives: using /usr/bin/bibtex.original to provide /usr/bin/bibtex (bibtex) in auto mode Setting up glib-networking:amd64 (2.60.3-1) ... Setting up texlive-base (2018.20190227-2) ... tl-paper: setting paper size for dvips to a4: /var/lib/texmf/dvips/config/config-paper.ps tl-paper: setting paper size for dvipdfmx to a4: /var/lib/texmf/dvipdfmx/dvipdfmx-paper.cfg tl-paper: setting paper size for xdvi to a4: /var/lib/texmf/xdvi/XDvi-paper tl-paper: setting paper size for pdftex to a4: /var/lib/texmf/tex/generic/config/pdftexconfig.tex Setting up libsoup2.4-1:amd64 (2.66.1-1) ... Setting up texlive-luatex (2018.20190227-2) ... Setting up dvipng (1.15-1.1) ... Setting up texlive-latex-base (2018.20190227-2) ... Setting up texlive-latex-recommended (2018.20190227-2) ... Setting up texlive-pictures (2018.20190227-2) ... Setting up texlive-fonts-recommended (2018.20190227-2) ... Setting up tipa (2:1.3-20) ... Regenerating '/var/lib/texmf/fmtutil.cnf-DEBIAN'... done. Regenerating '/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST'... done. update-fmtutil has updated the following file(s): /var/lib/texmf/fmtutil.cnf-DEBIAN /var/lib/texmf/fmtutil.cnf-TEXLIVEDIST If you want to activate the changes in the above file(s), you should run fmtutil-sys or fmtutil. Setting up libsoup-gnome2.4-1:amd64 (2.66.1-1) ... Setting up librest-0.7-0:amd64 (0.8.1-1) ... Setting up texlive-latex-extra (2018.20190227-2) ... Setting up texlive-xetex (2018.20190227-2) ... Setting up dh-autoreconf (19) ... Setting up adwaita-icon-theme (3.32.0-1ubuntu1) ... update-alternatives: using /usr/share/icons/Adwaita/cursor.theme to provide /usr/share/icons/default/index.theme (x-cursor-theme) in auto mode Setting up dh-strip-nondeterminism (1.1.2-1) ... Setting up libgtk-3-0:amd64 (3.24.8-1ubuntu1) ... Setting up debhelper (12.1.1ubuntu1) ... Setting up humanity-icon-theme (0.6.15) ... Setting up librsvg2-bin (2.44.10-2.1) ... Setting up ubuntu-mono (19.04-0ubuntu1) ... Processing triggers for systemd (240-6ubuntu9) ... Processing triggers for libc-bin (2.29-0ubuntu2) ... Processing triggers for sgml-base (1.29) ... Setting up docutils-common (0.14+dfsg-4) ... Processing triggers for sgml-base (1.29) ... Setting up python3-docutils (0.14+dfsg-4) ... update-alternatives: using /usr/share/docutils/scripts/python3/rst-buildhtml to provide /usr/bin/rst-buildhtml (rst-buildhtml) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rst2html to provide /usr/bin/rst2html (rst2html) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rst2html4 to provide /usr/bin/rst2html4 (rst2html4) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rst2html5 to provide /usr/bin/rst2html5 (rst2html5) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rst2latex to provide /usr/bin/rst2latex (rst2latex) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rst2man to provide /usr/bin/rst2man (rst2man) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rst2odt to provide /usr/bin/rst2odt (rst2odt) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rst2odt_prepstyles to provide /usr/bin/rst2odt_prepstyles (rst2odt_prepstyles) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rst2pseudoxml to provide /usr/bin/rst2pseudoxml (rst2pseudoxml) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rst2s5 to provide /usr/bin/rst2s5 (rst2s5) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rst2xetex to provide /usr/bin/rst2xetex (rst2xetex) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rst2xml to provide /usr/bin/rst2xml (rst2xml) in auto mode update-alternatives: using /usr/share/docutils/scripts/python3/rstpep2html to provide /usr/bin/rstpep2html (rstpep2html) in auto mode Setting up python-docutils (0.14+dfsg-4) ... update-alternatives: using /usr/share/docutils/scripts/python2/rst-buildhtml to provide /usr/bin/rst-buildhtml (rst-buildhtml) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2html to provide /usr/bin/rst2html (rst2html) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2html4 to provide /usr/bin/rst2html4 (rst2html4) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2html5 to provide /usr/bin/rst2html5 (rst2html5) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2latex to provide /usr/bin/rst2latex (rst2latex) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2man to provide /usr/bin/rst2man (rst2man) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2odt to provide /usr/bin/rst2odt (rst2odt) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2odt_prepstyles to provide /usr/bin/rst2odt_prepstyles (rst2odt_prepstyles) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2pseudoxml to provide /usr/bin/rst2pseudoxml (rst2pseudoxml) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2s5 to provide /usr/bin/rst2s5 (rst2s5) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2xetex to provide /usr/bin/rst2xetex (rst2xetex) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2xml to provide /usr/bin/rst2xml (rst2xml) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rstpep2html to provide /usr/bin/rstpep2html (rstpep2html) in auto mode Setting up python3-sphinx (1.8.5-1ubuntu1) ... update-alternatives: using /usr/share/sphinx/scripts/python3/sphinx-apidoc to provide /usr/bin/sphinx-apidoc (sphinx-apidoc) in auto mode update-alternatives: using /usr/share/sphinx/scripts/python3/sphinx-autogen to provide /usr/bin/sphinx-autogen (sphinx-autogen) in auto mode update-alternatives: using /usr/share/sphinx/scripts/python3/sphinx-build to provide /usr/bin/sphinx-build (sphinx-build) in auto mode update-alternatives: using /usr/share/sphinx/scripts/python3/sphinx-quickstart to provide /usr/bin/sphinx-quickstart (sphinx-quickstart) in auto mode Setting up python3-sphinxcontrib.websupport (1.1.0-2) ... Setting up sbuild-build-depends-sphinx-dummy (0.invalid.0) ... Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.38.1+dfsg-1) ... Processing triggers for tex-common (6.11) ... Running updmap-sys. This may take some time... done. Running mktexlsr /var/lib/texmf ... done. Building format(s) --all. This may take some time... done. +------------------------------------------------------------------------------+ | Build environment | +------------------------------------------------------------------------------+ Kernel: Linux 4.4.0-154-generic amd64 (x86_64) Toolchain package versions: binutils_2.32.51.20190702-1ubuntu1 dpkg-dev_1.19.6ubuntu1 g++-8_8.3.0-16ubuntu3 gcc-8_8.3.0-16ubuntu3 libc6-dev_2.29-0ubuntu2 libstdc++-8-dev_8.3.0-16ubuntu3 libstdc++6_9.1.0-5ubuntu1 linux-libc-dev_5.0.0-20.21 Package versions: adduser_3.118ubuntu1 advancecomp_2.1-2.1 adwaita-icon-theme_3.32.0-1ubuntu1 apt_1.9.1 autoconf_2.69-11 automake_1:1.16.1-4ubuntu3 autopoint_0.19.8.1-9 autotools-dev_20180224.1 base-files_10.2ubuntu3 base-passwd_3.5.46 bash_5.0-4ubuntu1 binutils_2.32.51.20190702-1ubuntu1 binutils-common_2.32.51.20190702-1ubuntu1 binutils-x86-64-linux-gnu_2.32.51.20190702-1ubuntu1 bsdmainutils_11.1.2ubuntu2 bsdutils_1:2.33.1-0.1ubuntu2 build-essential_12.6ubuntu1 bzip2_1.0.6-9.1 ca-certificates_20190110 coreutils_8.30-3ubuntu1 cpp_4:8.3.0-1ubuntu3 cpp-8_8.3.0-16ubuntu3 dash_0.5.10.2-5 dbus_1.12.14-1ubuntu2 dbus-user-session_1.12.14-1ubuntu2 dconf-gsettings-backend_0.32.0-1 dconf-service_0.32.0-1 debconf_1.5.72 debhelper_12.1.1ubuntu1 debianutils_4.8.6.1 dh-autoreconf_19 dh-python_3.20190308 dh-strip-nondeterminism_1.1.2-1 diffutils_1:3.7-3 dmsetup_2:1.02.155-2ubuntu4 docutils-common_0.14+dfsg-4 dpkg_1.19.6ubuntu1 dpkg-dev_1.19.6ubuntu1 dvipng_1.15-1.1 dwz_0.12.20190703-1 e2fslibs_1.45.2-1ubuntu1 e2fsprogs_1.45.2-1ubuntu1 fakeroot_1.23-1 fdisk_2.33.1-0.1ubuntu2 file_1:5.35-4 findutils_4.6.0+git+20190209-2 fontconfig_2.13.1-2ubuntu2 fontconfig-config_2.13.1-2ubuntu2 fonts-dejavu-core_2.37-1 fonts-lmodern_2.004.5-6 g++_4:8.3.0-1ubuntu3 g++-8_8.3.0-16ubuntu3 gcc_4:8.3.0-1ubuntu3 gcc-8_8.3.0-16ubuntu3 gcc-8-base_8.3.0-16ubuntu3 gcc-9-base_9.1.0-5ubuntu1 gettext_0.19.8.1-9 gettext-base_0.19.8.1-9 ghostscript_9.26~dfsg+0-0ubuntu8 glib-networking_2.60.3-1 glib-networking-common_2.60.3-1 glib-networking-services_2.60.3-1 gpg_2.2.12-1ubuntu3 gpg-agent_2.2.12-1ubuntu3 gpgconf_2.2.12-1ubuntu3 gpgv_2.2.12-1ubuntu3 graphviz_2.40.1-6 grep_3.3-1 groff-base_1.22.4-3 gsettings-desktop-schemas_3.31.91-1ubuntu1 gtk-update-icon-cache_3.24.8-1ubuntu1 gzip_1.10-0ubuntu1 hicolor-icon-theme_0.17-2 hostname_3.21 humanity-icon-theme_0.6.15 imagemagick-6-common_8:6.9.10.23+dfsg-2.1ubuntu3 imagemagick-6.q16_8:6.9.10.23+dfsg-2.1ubuntu3 init_1.57 init-system-helpers_1.57 initscripts_2.88dsf-59.3ubuntu2 insserv_1.14.0-5ubuntu3 intltool-debian_0.35.0+20060710.5 libacl1_2.2.53-4 libapparmor1_2.13.2-9ubuntu7 libapt-pkg5.0_1.8.0~alpha2ubuntu1 libapt-pkg5.90_1.9.1 libarchive-zip-perl_1.64-1 libargon2-1_0~20171227-0.2 libasan5_9.1.0-5ubuntu1 libassuan0_2.5.3-1 libatk-bridge2.0-0_2.32.0-1 libatk1.0-0_2.32.0-1 libatk1.0-data_2.32.0-1 libatomic1_9.1.0-5ubuntu1 libatspi2.0-0_2.32.0-1 libattr1_1:2.4.48-4 libaudit-common_1:2.8.4-3ubuntu1 libaudit1_1:2.8.4-3ubuntu1 libavahi-client3_0.7-4ubuntu5 libavahi-common-data_0.7-4ubuntu5 libavahi-common3_0.7-4ubuntu5 libbinutils_2.32.51.20190702-1ubuntu1 libblkid1_2.33.1-0.1ubuntu2 libbrotli1_1.0.7-2 libbsd0_0.9.1-2 libbz2-1.0_1.0.6-9.1 libc-bin_2.29-0ubuntu2 libc-dev-bin_2.29-0ubuntu2 libc6_2.29-0ubuntu2 libc6-dev_2.29-0ubuntu2 libcairo-gobject2_1.16.0-4 libcairo2_1.16.0-4 libcap-ng0_0.7.9-2 libcap2_1:2.25-2 libcc1-0_9.1.0-5ubuntu1 libcdt5_2.40.1-6 libcgraph6_2.40.1-6 libcolord2_1.4.3-4 libcom-err2_1.45.2-1ubuntu1 libcomerr2_1.45.2-1ubuntu1 libcroco3_0.6.12-3 libcryptsetup12_2:2.1.0-5ubuntu2 libcups2_2.2.10-6ubuntu1 libcupsimage2_2.2.10-6ubuntu1 libdatrie1_0.2.12-2 libdb5.3_5.3.28+dfsg1-0.6ubuntu1 libdbus-1-3_1.12.14-1ubuntu2 libdconf1_0.32.0-1 libdebconfclient0_0.249ubuntu1 libdevmapper1.02.1_2:1.02.155-2ubuntu4 libdpkg-perl_1.19.6ubuntu1 libelf1_0.176-1.1 libepoxy0_1.5.3-0.1 libexpat1_2.2.6-2 libext2fs2_1.45.2-1ubuntu1 libfakeroot_1.23-1 libfdisk1_2.33.1-0.1ubuntu2 libffi6_3.2.1-9 libfftw3-double3_3.3.8-2 libfile-stripnondeterminism-perl_1.1.2-1 libfontconfig1_2.13.1-2ubuntu2 libfreetype6_2.9.1-3 libfribidi0_1.0.5-3.1 libgcc-8-dev_8.3.0-16ubuntu3 libgcc1_1:9.1.0-5ubuntu1 libgcrypt20_1.8.4-5ubuntu1 libgd3_2.2.5-5.2 libgdbm-compat4_1.18.1-4 libgdbm6_1.18.1-4 libgdk-pixbuf2.0-0_2.38.1+dfsg-1 libgdk-pixbuf2.0-common_2.38.1+dfsg-1 libglib2.0-0_2.60.4-1 libgmp10_2:6.1.2+dfsg-4 libgnutls30_3.6.7-4ubuntu1 libgomp1_9.1.0-5ubuntu1 libgpg-error0_1.36-1 libgraphite2-3_1.3.13-7 libgs9_9.26~dfsg+0-0ubuntu8 libgs9-common_9.26~dfsg+0-0ubuntu8 libgssapi-krb5-2_1.17-3 libgtk-3-0_3.24.8-1ubuntu1 libgtk-3-common_3.24.8-1ubuntu1 libgts-0.7-5_0.7.6+darcs121130-4 libgvc6_2.40.1-6 libgvpr2_2.40.1-6 libharfbuzz-icu0_2.4.0-1 libharfbuzz0b_2.4.0-1 libhogweed4_3.4.1-1 libice6_2:1.0.9-2 libicu63_63.2-2 libidn11_1.33-2.2ubuntu2 libidn2-0_2.0.5-1 libijs-0.35_0.35-14 libip4tc0_1.6.1-2ubuntu3 libisl19_0.20-2 libisl21_0.21-1 libitm1_9.1.0-5ubuntu1 libjbig0_2.1-3.1build1 libjbig2dec0_0.16-1 libjpeg-turbo8_2.0.1-0ubuntu2 libjpeg8_8c-2ubuntu8 libjs-jquery_3.3.1~dfsg-3 libjs-sphinxdoc_1.8.5-1ubuntu1 libjs-underscore_1.9.1~dfsg-1 libjson-c3_0.12.1+ds-2 libjson-c4_0.13.1+dfsg-2 libjson-glib-1.0-0_1.4.4-2 libjson-glib-1.0-common_1.4.4-2 libk5crypto3_1.17-3 libkeyutils1_1.6-6 libkmod2_26-1ubuntu1 libkpathsea6_2018.20181218.49446-2 libkrb5-3_1.17-3 libkrb5support0_1.17-3 liblab-gamut1_2.40.1-6 liblcms2-2_2.9-3 liblockfile-bin_1.14-1.1 liblockfile1_1.14-1.1 liblqr-1-0_0.4.2-2.1 liblsan0_9.1.0-5ubuntu1 libltdl7_2.4.6-10 liblz4-1_1.9.1-1 liblzma5_5.2.4-1 libmagic-mgc_1:5.35-4 libmagic1_1:5.35-4 libmagickcore-6.q16-6_8:6.9.10.23+dfsg-2.1ubuntu3 libmagickwand-6.q16-6_8:6.9.10.23+dfsg-2.1ubuntu3 libmount1_2.33.1-0.1ubuntu2 libmpc3_1.1.0-1 libmpdec2_2.4.2-2 libmpfr6_4.0.2-1 libmpx2_8.3.0-16ubuntu3 libncurses6_6.1+20181013-2ubuntu2 libncursesw6_6.1+20181013-2ubuntu2 libnettle6_3.4.1-1 libnpth0_1.6-1 libp11-kit0_0.23.15-2 libpam-modules_1.3.1-5ubuntu1 libpam-modules-bin_1.3.1-5ubuntu1 libpam-runtime_1.3.1-5ubuntu1 libpam-systemd_240-6ubuntu9 libpam0g_1.3.1-5ubuntu1 libpango-1.0-0_1.42.4-6 libpangocairo-1.0-0_1.42.4-6 libpangoft2-1.0-0_1.42.4-6 libpaper-utils_1.1.28 libpaper1_1.1.28 libpathplan4_2.40.1-6 libpcre2-8-0_10.32-5 libpcre3_2:8.39-12 libperl5.28_5.28.1-6 libpipeline1_1.5.1-2 libpixman-1-0_0.36.0-1 libpng16-16_1.6.37-1 libpotrace0_1.15-1 libprocps7_2:3.3.15-2ubuntu2 libproxy1v5_0.4.15-5 libpsl5_0.20.2-2 libptexenc1_2018.20181218.49446-2 libpython-stdlib_2.7.16-1 libpython2-stdlib_2.7.16-1 libpython2.7-minimal_2.7.16-2 libpython2.7-stdlib_2.7.16-2 libpython3-stdlib_3.7.3-1 libpython3.7-minimal_3.7.4~rc2-1 libpython3.7-stdlib_3.7.4~rc2-1 libquadmath0_9.1.0-5ubuntu1 libreadline7_7.0-5 libreadline8_8.0-1 librest-0.7-0_0.8.1-1 librsvg2-2_2.44.10-2.1 librsvg2-bin_2.44.10-2.1 librsvg2-common_2.44.10-2.1 libseccomp2_2.4.1-0ubuntu0.19.10.3 libselinux1_2.9-1 libsemanage-common_2.9-1 libsemanage1_2.9-1 libsepol1_2.9-1 libsigsegv2_2.12-2 libslang2_2.3.2-3 libsm6_2:1.2.3-1 libsmartcols1_2.33.1-0.1ubuntu2 libsoup-gnome2.4-1_2.66.1-1 libsoup2.4-1_2.66.1-1 libsqlite3-0_3.27.2-3 libss2_1.45.2-1ubuntu1 libssl1.1_1.1.1c-1ubuntu3 libstdc++-8-dev_8.3.0-16ubuntu3 libstdc++6_9.1.0-5ubuntu1 libstemmer0d_0+svn585-1build1 libsynctex2_2018.20181218.49446-2 libsystemd0_240-6ubuntu9 libtasn1-6_4.13-3 libteckit0_2.5.8+ds2-5ubuntu1 libtexlua52_2018.20181218.49446-2 libtexlua53_2018.20181218.49446-2 libtexluajit2_2018.20181218.49446-2 libtext-unidecode-perl_1.30-1 libthai-data_0.1.28-2 libthai0_0.1.28-2 libtiff5_4.0.10-4 libtinfo6_6.1+20181013-2ubuntu2 libtool_2.4.6-10 libtsan0_9.1.0-5ubuntu1 libubsan1_9.1.0-5ubuntu1 libuchardet0_0.0.6-3 libudev1_240-6ubuntu9 libunistring2_0.9.10-1ubuntu2 libusb-0.1-4_2:0.1.12-32 libuuid1_2.33.1-0.1ubuntu2 libwayland-client0_1.16.0-1ubuntu2 libwayland-cursor0_1.16.0-1ubuntu2 libwayland-egl1_1.16.0-1ubuntu2 libwebp6_0.6.1-2 libwebpmux3_0.6.1-2 libwoff1_1.0.2-1build1 libx11-6_2:1.6.7-1 libx11-data_2:1.6.7-1 libxau6_1:1.0.8-1 libxaw7_2:1.0.13-1 libxcb-render0_1.13.1-2 libxcb-shm0_1.13.1-2 libxcb1_1.13.1-2 libxcomposite1_1:0.4.4-2 libxcursor1_1:1.2.0-1 libxdamage1_1:1.1.4-3 libxdmcp6_1:1.1.2-3 libxext6_2:1.3.3-1 libxfixes3_1:5.0.3-1 libxi6_2:1.7.9-1 libxinerama1_2:1.1.4-2 libxkbcommon0_0.8.2-1 libxml-libxml-perl_2.0134+dfsg-1 libxml-namespacesupport-perl_1.12-1 libxml-sax-base-perl_1.09-1 libxml-sax-perl_1.00+dfsg-1.1~build1 libxml2_2.9.4+dfsg1-7ubuntu3 libxmu6_2:1.1.2-2 libxpm4_1:3.5.12-1 libxrandr2_2:1.5.1-1 libxrender1_1:0.9.10-1 libxt6_1:1.1.5-1 libxxhash0_0.6.5-3 libzstd1_1.3.8+dfsg-3 libzzip-0-13_0.13.62-3.2 linux-libc-dev_5.0.0-20.21 lockfile-progs_0.1.18 login_1:4.5-1.1ubuntu2 lsb-base_10.2019051400ubuntu1 m4_1.4.18-2 make_4.2.1-1.2 man-db_2.8.5-2 mawk_1.3.3-17ubuntu3 mime-support_3.62ubuntu1 mount_2.33.1-0.1ubuntu2 multiarch-support_2.29-0ubuntu2 ncurses-base_6.1+20181013-2ubuntu2 ncurses-bin_6.1+20181013-2ubuntu2 openssl_1.1.1c-1ubuntu3 optipng_0.7.7-1 passwd_1:4.5-1.1ubuntu2 patch_2.7.6-4 perl_5.28.1-6 perl-base_5.28.1-6 perl-modules-5.28_5.28.1-6 pinentry-curses_1.1.0-2 pkgbinarymangler_144 po-debconf_1.0.21 policyrcd-script-zg2_0.1-3 poppler-data_0.4.9-2 preview-latex-style_11.91-1ubuntu1 procps_2:3.3.15-2ubuntu2 python_2.7.16-1 python-alabaster_0.7.8-1 python-all_2.7.16-1 python-atomicwrites_1.1.5-2 python-attr_18.2.0-1 python-babel_2.6.0+dfsg.1-1 python-babel-localedata_2.6.0+dfsg.1-1 python-certifi_2018.8.24-1 python-chardet_3.0.4-3 python-docutils_0.14+dfsg-4 python-enum34_1.1.6-2 python-funcsigs_1.0.2-4 python-html5lib_1.0.1-1 python-idna_2.6-1 python-imagesize_1.0.0-1 python-jinja2_2.10-2ubuntu1 python-markupsafe_1.1.0-1 python-minimal_2.7.16-1 python-mock_2.0.0-4 python-more-itertools_4.2.0-1 python-packaging_19.0-1 python-pathlib2_2.3.3-1 python-pbr_5.1.1-0ubuntu2 python-pkg-resources_41.0.1-1 python-pluggy_0.8.0-1 python-py_1.7.0-2 python-pygments_2.3.1+dfsg-1ubuntu1 python-pyparsing_2.2.0+dfsg1-2 python-pytest_3.10.1-2 python-requests_2.21.0-1 python-roman_2.0.0-3 python-scandir_1.10.0-1 python-setuptools_41.0.1-1 python-six_1.12.0-1 python-stemmer_1.3.0+dfsg-1build9 python-typing_3.6.6-1 python-tz_2019.1-1 python-urllib3_1.24.1-1ubuntu1 python-webencodings_0.5.1-1 python2_2.7.16-1 python2-minimal_2.7.16-1 python2.7_2.7.16-2 python2.7-minimal_2.7.16-2 python3_3.7.3-1 python3-alabaster_0.7.8-1 python3-all_3.7.3-1 python3-atomicwrites_1.1.5-2 python3-attr_18.2.0-1 python3-babel_2.6.0+dfsg.1-1 python3-certifi_2018.8.24-1 python3-chardet_3.0.4-3 python3-distutils_3.7.3-1ubuntu1 python3-docutils_0.14+dfsg-4 python3-html5lib_1.0.1-1 python3-idna_2.6-1 python3-imagesize_1.0.0-1 python3-jinja2_2.10-2ubuntu1 python3-lib2to3_3.7.3-1ubuntu1 python3-markupsafe_1.1.0-1 python3-minimal_3.7.3-1 python3-mock_2.0.0-4 python3-more-itertools_4.2.0-1 python3-packaging_19.0-1 python3-pbr_5.1.1-0ubuntu2 python3-pkg-resources_41.0.1-1 python3-pluggy_0.8.0-1 python3-py_1.7.0-2 python3-pygments_2.3.1+dfsg-1ubuntu1 python3-pyparsing_2.2.0+dfsg1-2 python3-pytest_3.10.1-2 python3-requests_2.21.0-1 python3-roman_2.0.0-3 python3-setuptools_41.0.1-1 python3-six_1.12.0-1 python3-sphinx_1.8.5-1ubuntu1 python3-sphinxcontrib.websupport_1.1.0-2 python3-stemmer_1.3.0+dfsg-1build9 python3-tz_2019.1-1 python3-urllib3_1.24.1-1ubuntu1 python3-webencodings_0.5.1-1 python3.7_3.7.4~rc2-1 python3.7-minimal_3.7.4~rc2-1 readline-common_8.0-1 sbuild-build-depends-core-dummy_0.invalid.0 sbuild-build-depends-sphinx-dummy_0.invalid.0 sed_4.7-1 sensible-utils_0.0.12 sgml-base_1.29 shared-mime-info_1.10-1 sphinx-common_1.8.5-1ubuntu1 systemd_240-6ubuntu9 systemd-sysv_240-6ubuntu9 sysv-rc_2.88dsf-59.3ubuntu2 sysvinit-utils_2.93-8ubuntu1 t1utils_1.41-3 tar_1.30+dfsg-6 teckit_2.5.8+ds2-5ubuntu1 tex-common_6.11 texinfo_6.5.0.dfsg.1-5 texlive-base_2018.20190227-2 texlive-binaries_2018.20181218.49446-2 texlive-fonts-recommended_2018.20190227-2 texlive-latex-base_2018.20190227-2 texlive-latex-extra_2018.20190227-2 texlive-latex-recommended_2018.20190227-2 texlive-luatex_2018.20190227-2 texlive-pictures_2018.20190227-2 texlive-xetex_2018.20190227-2 tipa_2:1.3-20 tzdata_2019a-1 ubuntu-keyring_2018.09.18.1 ubuntu-mono_19.04-0ubuntu1 ucf_3.0038+nmu1 util-linux_2.33.1-0.1ubuntu2 x11-common_1:7.7+19ubuntu12 xdg-utils_1.1.3-1ubuntu2 xkb-data_2.26-2ubuntu1 xml-core_0.18+nmu1 xz-utils_5.2.4-1 zlib1g_1:1.2.11.dfsg-1ubuntu2 +------------------------------------------------------------------------------+ | Build | +------------------------------------------------------------------------------+ Unpack source ------------- gpgv: Signature made Tue Jun 25 18:05:10 2019 UTC gpgv: using RSA key 384AFD31CEFE0600F9E8DA7DD328D72318ACE6C7 gpgv: Can't check signature: No public key dpkg-source: warning: failed to verify signature on ./sphinx_1.8.5-1ubuntu2.dsc dpkg-source: info: extracting sphinx in sphinx-1.8.5 dpkg-source: info: unpacking sphinx_1.8.5.orig.tar.gz dpkg-source: info: unpacking sphinx_1.8.5-1ubuntu2.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying disable_js_version_check.diff dpkg-source: info: applying no_snowballstemmer.diff dpkg-source: info: applying skip_tests_network.diff dpkg-source: info: applying no_require_websupport.diff dpkg-source: info: applying no_external_css.diff dpkg-source: info: applying no_require_setuptools.diff dpkg-source: info: applying no_external_image.diff dpkg-source: info: applying python2_tests_import_hack.diff dpkg-source: info: applying python2_test_get_module_source.diff dpkg-source: info: applying python3_tests_open.diff Check disc space ---------------- Sufficient free space for build User Environment ---------------- APT_CONFIG=/var/lib/sbuild/apt.conf DEB_BUILD_OPTIONS=parallel=4 HOME=/sbuild-nonexistent LANG=C.UTF-8 LC_ALL=C.UTF-8 LOGNAME=buildd PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games SCHROOT_ALIAS_NAME=build-PACKAGEBUILD-17190682 SCHROOT_CHROOT_NAME=build-PACKAGEBUILD-17190682 SCHROOT_COMMAND=env SCHROOT_GID=2501 SCHROOT_GROUP=buildd SCHROOT_SESSION_ID=build-PACKAGEBUILD-17190682 SCHROOT_UID=2001 SCHROOT_USER=buildd SHELL=/bin/sh TERM=unknown USER=buildd V=1 dpkg-buildpackage ----------------- dpkg-buildpackage: info: source package sphinx dpkg-buildpackage: info: source version 1.8.5-1ubuntu2 dpkg-buildpackage: info: source distribution eoan dpkg-source --before-build . dpkg-buildpackage: info: host architecture amd64 dpkg-source: info: using options from sphinx-1.8.5/debian/source/options: --extend-diff-ignore=^[^/]*[.]egg-info/ --extend-diff-ignore=^sphinx/locale/[^/]+/LC_MESSAGES/ fakeroot debian/rules clean dh clean --with python2,python3 --buildsystem=pybuild dh_auto_clean -O--buildsystem=pybuild I: pybuild base:217: python2.7 setup.py clean running clean removing '/<>/.pybuild/cpython2_2.7/build' (and everything under it) 'build/bdist.linux-amd64' does not exist -- can't clean it 'build/scripts-2.7' does not exist -- can't clean it I: pybuild base:217: python3.7 setup.py clean running clean removing '/<>/.pybuild/cpython3_3.7/build' (and everything under it) /usr/lib/python3/dist-packages/setuptools/depends.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp /usr/lib/python3/dist-packages/babel/localedata.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import MutableMapping 'build/bdist.linux-amd64' does not exist -- can't clean it 'build/scripts-3.7' does not exist -- can't clean it dh_autoreconf_clean -O--buildsystem=pybuild dh_clean -O--buildsystem=pybuild debian/rules build dh build --with python2,python3 --buildsystem=pybuild dh_update_autotools_config -O--buildsystem=pybuild dh_autoreconf -O--buildsystem=pybuild dh_auto_configure -O--buildsystem=pybuild I: pybuild base:217: python2.7 setup.py config running config I: pybuild base:217: python3.7 setup.py config running config /usr/lib/python3/dist-packages/setuptools/depends.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp /usr/lib/python3/dist-packages/babel/localedata.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import MutableMapping debian/rules override_dh_auto_build make[1]: Entering directory '/<>' ln -sf /usr/share/javascript/jquery/jquery.js sphinx/themes/basic/static/jquery.js ln -sf /usr/share/javascript/underscore/underscore.js sphinx/themes/basic/static/underscore.js dh_auto_build I: pybuild base:217: /usr/bin/python setup.py build running build running build_py creating /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/config.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/apidoc.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/theming.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/cmdline.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/extension.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/jinja2glue.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/deprecation.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/addnodes.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/pygments_styles.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/io.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/errors.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/events.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/roles.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/setup_command.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/__main__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/versioning.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/quickstart.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/parsers.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/make_mode.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/highlighting.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/registry.py -> /<>/.pybuild/cpython2_2.7/build/sphinx copying sphinx/application.py -> /<>/.pybuild/cpython2_2.7/build/sphinx creating /<>/.pybuild/cpython2_2.7/build/sphinx/directives copying sphinx/directives/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/directives copying sphinx/directives/other.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/directives copying sphinx/directives/patches.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/directives copying sphinx/directives/code.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/directives creating /<>/.pybuild/cpython2_2.7/build/sphinx/testing copying sphinx/testing/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/testing copying sphinx/testing/fixtures.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/testing copying sphinx/testing/util.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/testing copying sphinx/testing/path.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/testing creating /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/html.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/websupport.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/xml.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/devhelp.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/dummy.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/gettext.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/qthelp.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/manpage.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/linkcheck.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/epub3.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/_epub_base.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/applehelp.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/texinfo.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/htmlhelp.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/text.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders copying sphinx/builders/changes.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders creating /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/apidoc.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/inheritance_diagram.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/todo.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/graphviz.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/mathbase.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/imgmath.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/extlinks.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/intersphinx.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/mathjax.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/linkcode.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/ifconfig.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/coverage.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/githubpages.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/autosectionlabel.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/imgconverter.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/doctest.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/viewcode.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext copying sphinx/ext/jsmath.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext creating /<>/.pybuild/cpython2_2.7/build/sphinx/cmd copying sphinx/cmd/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/cmd copying sphinx/cmd/build.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/cmd copying sphinx/cmd/quickstart.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/cmd copying sphinx/cmd/make_mode.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/cmd creating /<>/.pybuild/cpython2_2.7/build/sphinx/websupport copying sphinx/websupport/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/websupport copying sphinx/websupport/errors.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/websupport creating /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/da.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/no.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/tr.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/de.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/zh.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/fi.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/sv.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/jssplitter.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/fr.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/es.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/ro.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/ja.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/en.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/pt.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/hu.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/nl.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/ru.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search copying sphinx/search/it.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/search creating /<>/.pybuild/cpython2_2.7/build/sphinx/writers copying sphinx/writers/html.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/writers copying sphinx/writers/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/writers copying sphinx/writers/websupport.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/writers copying sphinx/writers/xml.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/writers copying sphinx/writers/manpage.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/writers copying sphinx/writers/texinfo.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/writers copying sphinx/writers/text.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/writers copying sphinx/writers/html5.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/writers copying sphinx/writers/latex.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/writers creating /<>/.pybuild/cpython2_2.7/build/sphinx/domains copying sphinx/domains/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/domains copying sphinx/domains/cpp.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/domains copying sphinx/domains/c.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/domains copying sphinx/domains/std.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/domains copying sphinx/domains/python.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/domains copying sphinx/domains/changeset.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/domains copying sphinx/domains/javascript.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/domains copying sphinx/domains/rst.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/domains copying sphinx/domains/math.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/domains creating /<>/.pybuild/cpython2_2.7/build/sphinx/transforms copying sphinx/transforms/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/transforms copying sphinx/transforms/i18n.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/transforms copying sphinx/transforms/references.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/transforms copying sphinx/transforms/compact_bullet_list.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/transforms creating /<>/.pybuild/cpython2_2.7/build/sphinx/pycode copying sphinx/pycode/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/pycode copying sphinx/pycode/parser.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/pycode creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale copying sphinx/locale/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale creating /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/jsonimpl.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/osutil.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/i18n.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/websupport.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/console.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/parallel.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/nodes.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/inspect.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/docutils.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/png.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/logging.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/docfields.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/typing.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/images.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/inventory.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/build_phase.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/jsdump.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/compat.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/tags.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/matching.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/docstrings.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/requests.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/texescape.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/smartypants.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/fileutil.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/rst.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/math.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/template.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util copying sphinx/util/pycompat.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util creating /<>/.pybuild/cpython2_2.7/build/sphinx/environment copying sphinx/environment/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment creating /<>/.pybuild/cpython2_2.7/build/sphinx/builders/latex copying sphinx/builders/latex/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders/latex copying sphinx/builders/latex/nodes.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders/latex copying sphinx/builders/latex/transforms.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/builders/latex creating /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autosummary copying sphinx/ext/autosummary/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autosummary copying sphinx/ext/autosummary/generate.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autosummary creating /<>/.pybuild/cpython2_2.7/build/sphinx/ext/napoleon copying sphinx/ext/napoleon/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/napoleon copying sphinx/ext/napoleon/iterators.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/napoleon copying sphinx/ext/napoleon/docstring.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/napoleon creating /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autodoc copying sphinx/ext/autodoc/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autodoc copying sphinx/ext/autodoc/inspector.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autodoc copying sphinx/ext/autodoc/directive.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autodoc copying sphinx/ext/autodoc/importer.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autodoc creating /<>/.pybuild/cpython2_2.7/build/sphinx/websupport/search copying sphinx/websupport/search/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/websupport/search copying sphinx/websupport/search/whooshsearch.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/websupport/search copying sphinx/websupport/search/xapiansearch.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/websupport/search copying sphinx/websupport/search/nullsearch.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/websupport/search creating /<>/.pybuild/cpython2_2.7/build/sphinx/websupport/storage copying sphinx/websupport/storage/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/websupport/storage copying sphinx/websupport/storage/sqlalchemystorage.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/websupport/storage copying sphinx/websupport/storage/sqlalchemy_db.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/websupport/storage copying sphinx/websupport/storage/differ.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/websupport/storage creating /<>/.pybuild/cpython2_2.7/build/sphinx/transforms/post_transforms copying sphinx/transforms/post_transforms/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/transforms/post_transforms copying sphinx/transforms/post_transforms/images.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/transforms/post_transforms copying sphinx/transforms/post_transforms/code.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/transforms/post_transforms copying sphinx/transforms/post_transforms/compat.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/transforms/post_transforms creating /<>/.pybuild/cpython2_2.7/build/sphinx/util/stemmer copying sphinx/util/stemmer/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util/stemmer copying sphinx/util/stemmer/porter.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/util/stemmer creating /<>/.pybuild/cpython2_2.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/asset.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/dependencies.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/indexentries.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/metadata.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/toctree.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/title.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment/collectors creating /<>/.pybuild/cpython2_2.7/build/sphinx/environment/adapters copying sphinx/environment/adapters/__init__.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment/adapters copying sphinx/environment/adapters/asset.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment/adapters copying sphinx/environment/adapters/indexentries.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment/adapters copying sphinx/environment/adapters/toctree.py -> /<>/.pybuild/cpython2_2.7/build/sphinx/environment/adapters running egg_info writing requirements to Sphinx.egg-info/requires.txt writing Sphinx.egg-info/PKG-INFO writing top-level names to Sphinx.egg-info/top_level.txt writing dependency_links to Sphinx.egg-info/dependency_links.txt writing entry points to Sphinx.egg-info/entry_points.txt reading manifest file 'Sphinx.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'sphinx-autogen.py' warning: no files found matching 'sphinx-build.py' warning: no files found matching 'sphinx-quickstart.py' warning: no files found matching 'sphinx-apidoc.py' warning: no files found matching 'sphinx/locale/.tx/config' no previously-included directories found matching 'doc/_build' no previously-included directories found matching 'sphinx/locale/.tx' writing manifest file 'Sphinx.egg-info/SOURCES.txt' creating /<>/.pybuild/cpython2_2.7/build/sphinx/templates creating /<>/.pybuild/cpython2_2.7/build/sphinx/templates/epub3 copying sphinx/templates/epub3/container.xml -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/epub3 copying sphinx/templates/epub3/content.opf_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/epub3 copying sphinx/templates/epub3/mimetype -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/epub3 copying sphinx/templates/epub3/nav.xhtml_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/epub3 copying sphinx/templates/epub3/toc.ncx_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/epub3 creating /<>/.pybuild/cpython2_2.7/build/sphinx/templates/graphviz copying sphinx/templates/graphviz/graphviz.css -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/graphviz creating /<>/.pybuild/cpython2_2.7/build/sphinx/templates/latex copying sphinx/templates/latex/latex.tex_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/latex copying sphinx/templates/latex/longtable.tex_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/latex copying sphinx/templates/latex/tabular.tex_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/latex copying sphinx/templates/latex/tabulary.tex_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/latex creating /<>/.pybuild/cpython2_2.7/build/sphinx/templates/qthelp copying sphinx/templates/qthelp/project.qhcp -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/qthelp copying sphinx/templates/qthelp/project.qhp -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/qthelp creating /<>/.pybuild/cpython2_2.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/Makefile.new_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/Makefile_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/conf.py_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/make.bat.new_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/make.bat_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/master_doc.rst_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/templates/quickstart creating /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/LICRcyr2utf8.xdy -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/LICRlatin2utf8.xdy -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/LatinRules.xdy -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/Makefile_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/footnotehyper-sphinx.sty -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/latexmkjarc -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/latexmkrc_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/make.bat_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/python.ist -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/sphinx.sty -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/sphinx.xdy -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/sphinxhowto.cls -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/sphinxmanual.cls -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs copying sphinx/texinputs/sphinxmulticell.sty -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs creating /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs_win copying sphinx/texinputs_win/Makefile_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/texinputs_win creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/agogo copying sphinx/themes/agogo/layout.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/agogo copying sphinx/themes/agogo/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/agogo creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/agogo/static copying sphinx/themes/agogo/static/agogo.css_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/agogo/static copying sphinx/themes/agogo/static/bgfooter.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/agogo/static copying sphinx/themes/agogo/static/bgtop.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/agogo/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/defindex.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/domainindex.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/genindex-single.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/genindex-split.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/genindex.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/globaltoc.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/layout.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/localtoc.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/opensearch.xml -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/page.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/relations.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/search.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/searchbox.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/searchresults.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/sourcelink.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic copying sphinx/themes/basic/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/changes copying sphinx/themes/basic/changes/frameset.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/changes copying sphinx/themes/basic/changes/rstsource.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/changes copying sphinx/themes/basic/changes/versionchanges.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/changes creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/ajax-loader.gif -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/basic.css_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/comment-bright.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/comment-close.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/comment.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/doctools.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/documentation_options.js_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/down-pressed.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/down.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/file.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/jquery.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/language_data.js_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/minus.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/plus.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/searchtools.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/underscore.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/up-pressed.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/up.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/websupport.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/basic/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/bizstyle copying sphinx/themes/bizstyle/layout.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/bizstyle copying sphinx/themes/bizstyle/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/bizstyle creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/bizstyle/static copying sphinx/themes/bizstyle/static/background_b01.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/bizstyle/static copying sphinx/themes/bizstyle/static/bizstyle.css_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/bizstyle/static copying sphinx/themes/bizstyle/static/bizstyle.js_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/bizstyle/static copying sphinx/themes/bizstyle/static/css3-mediaqueries.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/bizstyle/static copying sphinx/themes/bizstyle/static/css3-mediaqueries_src.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/bizstyle/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/classic copying sphinx/themes/classic/layout.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/classic copying sphinx/themes/classic/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/classic creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/classic/static copying sphinx/themes/classic/static/classic.css_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/classic/static copying sphinx/themes/classic/static/sidebar.js_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/classic/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/default copying sphinx/themes/default/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/default creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/default/static copying sphinx/themes/default/static/default.css -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/default/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/epub copying sphinx/themes/epub/epub-cover.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/epub copying sphinx/themes/epub/layout.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/epub copying sphinx/themes/epub/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/epub creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/epub/static copying sphinx/themes/epub/static/epub.css_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/epub/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/haiku copying sphinx/themes/haiku/layout.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/haiku copying sphinx/themes/haiku/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/haiku creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/haiku/static copying sphinx/themes/haiku/static/alert_info_32.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/haiku/static copying sphinx/themes/haiku/static/alert_warning_32.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/haiku/static copying sphinx/themes/haiku/static/bg-page.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/haiku/static copying sphinx/themes/haiku/static/bullet_orange.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/haiku/static copying sphinx/themes/haiku/static/haiku.css_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/haiku/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/nature copying sphinx/themes/nature/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/nature creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/nature/static copying sphinx/themes/nature/static/nature.css_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/nature/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/nonav copying sphinx/themes/nonav/layout.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/nonav copying sphinx/themes/nonav/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/nonav creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/nonav/static copying sphinx/themes/nonav/static/nonav.css -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/nonav/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid copying sphinx/themes/pyramid/layout.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid copying sphinx/themes/pyramid/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/dialog-note.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/dialog-seealso.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/dialog-todo.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/dialog-topic.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/dialog-warning.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/epub.css -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/footerbg.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/headerbg.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/ie6.css -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/middlebg.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/pyramid.css_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/transparent.gif -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/pyramid/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls copying sphinx/themes/scrolls/layout.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls copying sphinx/themes/scrolls/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/artwork copying sphinx/themes/scrolls/artwork/logo.svg -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/artwork creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/darkmetal.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/headerbg.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/logo.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/metal.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/navigation.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/print.css -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/scrolls.css_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/theme_extras.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/watermark.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/watermark_blur.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/scrolls/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/sphinxdoc copying sphinx/themes/sphinxdoc/layout.html -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/sphinxdoc copying sphinx/themes/sphinxdoc/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/sphinxdoc creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/sphinxdoc/static copying sphinx/themes/sphinxdoc/static/contents.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/sphinxdoc/static copying sphinx/themes/sphinxdoc/static/navigation.png -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/sphinxdoc/static copying sphinx/themes/sphinxdoc/static/sphinxdoc.css_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/sphinxdoc/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/traditional copying sphinx/themes/traditional/theme.conf -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/traditional creating /<>/.pybuild/cpython2_2.7/build/sphinx/themes/traditional/static copying sphinx/themes/traditional/static/traditional.css_t -> /<>/.pybuild/cpython2_2.7/build/sphinx/themes/traditional/static creating /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/danish-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/dutch-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/finnish-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/french-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/german-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/hungarian-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/italian-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/norwegian-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/porter-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/portuguese-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/romanian-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/russian-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/spanish-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/swedish-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/turkish-stemmer.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/search/non-minified-js copying sphinx/locale/sphinx.pot -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ar creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ar/LC_MESSAGES copying sphinx/locale/ar/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ar/LC_MESSAGES copying sphinx/locale/ar/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ar/LC_MESSAGES copying sphinx/locale/ar/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ar/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/bn creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/bn/LC_MESSAGES copying sphinx/locale/bn/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/bn/LC_MESSAGES copying sphinx/locale/bn/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/bn/LC_MESSAGES copying sphinx/locale/bn/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/bn/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ca creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ca/LC_MESSAGES copying sphinx/locale/ca/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ca/LC_MESSAGES copying sphinx/locale/ca/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ca/LC_MESSAGES copying sphinx/locale/ca/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ca/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/cs creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/cs/LC_MESSAGES copying sphinx/locale/cs/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/cs/LC_MESSAGES copying sphinx/locale/cs/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/cs/LC_MESSAGES copying sphinx/locale/cs/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/cs/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/cy creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/cy/LC_MESSAGES copying sphinx/locale/cy/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/cy/LC_MESSAGES copying sphinx/locale/cy/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/cy/LC_MESSAGES copying sphinx/locale/cy/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/cy/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/da creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/da/LC_MESSAGES copying sphinx/locale/da/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/da/LC_MESSAGES copying sphinx/locale/da/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/da/LC_MESSAGES copying sphinx/locale/da/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/da/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/de creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/de/LC_MESSAGES copying sphinx/locale/de/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/de/LC_MESSAGES copying sphinx/locale/de/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/de/LC_MESSAGES copying sphinx/locale/de/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/de/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/el creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/el/LC_MESSAGES copying sphinx/locale/el/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/el/LC_MESSAGES copying sphinx/locale/el/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/el/LC_MESSAGES copying sphinx/locale/el/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/el/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/eo creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/eo/LC_MESSAGES copying sphinx/locale/eo/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/eo/LC_MESSAGES copying sphinx/locale/eo/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/eo/LC_MESSAGES copying sphinx/locale/eo/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/eo/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/es creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/es/LC_MESSAGES copying sphinx/locale/es/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/es/LC_MESSAGES copying sphinx/locale/es/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/es/LC_MESSAGES copying sphinx/locale/es/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/es/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/et creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/et/LC_MESSAGES copying sphinx/locale/et/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/et/LC_MESSAGES copying sphinx/locale/et/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/et/LC_MESSAGES copying sphinx/locale/et/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/et/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/eu creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/eu/LC_MESSAGES copying sphinx/locale/eu/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/eu/LC_MESSAGES copying sphinx/locale/eu/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/eu/LC_MESSAGES copying sphinx/locale/eu/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/eu/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fa creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fa/LC_MESSAGES copying sphinx/locale/fa/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fa/LC_MESSAGES copying sphinx/locale/fa/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fa/LC_MESSAGES copying sphinx/locale/fa/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fa/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fi creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fi/LC_MESSAGES copying sphinx/locale/fi/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fi/LC_MESSAGES copying sphinx/locale/fi/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fi/LC_MESSAGES copying sphinx/locale/fi/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fi/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fr creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fr/LC_MESSAGES copying sphinx/locale/fr/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fr/LC_MESSAGES copying sphinx/locale/fr/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fr/LC_MESSAGES copying sphinx/locale/fr/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/fr/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/he creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/he/LC_MESSAGES copying sphinx/locale/he/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/he/LC_MESSAGES copying sphinx/locale/he/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/he/LC_MESSAGES copying sphinx/locale/he/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/he/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hi creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hi/LC_MESSAGES copying sphinx/locale/hi/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hi/LC_MESSAGES copying sphinx/locale/hi/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hi/LC_MESSAGES copying sphinx/locale/hi/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hi/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hi_IN creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hi_IN/LC_MESSAGES copying sphinx/locale/hi_IN/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hi_IN/LC_MESSAGES copying sphinx/locale/hi_IN/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hi_IN/LC_MESSAGES copying sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hi_IN/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hr creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hr/LC_MESSAGES copying sphinx/locale/hr/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hr/LC_MESSAGES copying sphinx/locale/hr/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hr/LC_MESSAGES copying sphinx/locale/hr/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hr/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hu creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hu/LC_MESSAGES copying sphinx/locale/hu/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hu/LC_MESSAGES copying sphinx/locale/hu/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hu/LC_MESSAGES copying sphinx/locale/hu/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/hu/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/id creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/id/LC_MESSAGES copying sphinx/locale/id/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/id/LC_MESSAGES copying sphinx/locale/id/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/id/LC_MESSAGES copying sphinx/locale/id/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/id/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/it creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/it/LC_MESSAGES copying sphinx/locale/it/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/it/LC_MESSAGES copying sphinx/locale/it/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/it/LC_MESSAGES copying sphinx/locale/it/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/it/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ja creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ja/LC_MESSAGES copying sphinx/locale/ja/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ja/LC_MESSAGES copying sphinx/locale/ja/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ja/LC_MESSAGES copying sphinx/locale/ja/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ja/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ko creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ko/LC_MESSAGES copying sphinx/locale/ko/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ko/LC_MESSAGES copying sphinx/locale/ko/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ko/LC_MESSAGES copying sphinx/locale/ko/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ko/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/lt creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/lt/LC_MESSAGES copying sphinx/locale/lt/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/lt/LC_MESSAGES copying sphinx/locale/lt/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/lt/LC_MESSAGES copying sphinx/locale/lt/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/lt/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/lv creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/lv/LC_MESSAGES copying sphinx/locale/lv/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/lv/LC_MESSAGES copying sphinx/locale/lv/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/lv/LC_MESSAGES copying sphinx/locale/lv/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/lv/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/mk creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/mk/LC_MESSAGES copying sphinx/locale/mk/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/mk/LC_MESSAGES copying sphinx/locale/mk/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/mk/LC_MESSAGES copying sphinx/locale/mk/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/mk/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/nb_NO creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/nb_NO/LC_MESSAGES copying sphinx/locale/nb_NO/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/nb_NO/LC_MESSAGES copying sphinx/locale/nb_NO/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/nb_NO/LC_MESSAGES copying sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/nb_NO/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ne creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ne/LC_MESSAGES copying sphinx/locale/ne/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ne/LC_MESSAGES copying sphinx/locale/ne/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ne/LC_MESSAGES copying sphinx/locale/ne/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ne/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/nl creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/nl/LC_MESSAGES copying sphinx/locale/nl/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/nl/LC_MESSAGES copying sphinx/locale/nl/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/nl/LC_MESSAGES copying sphinx/locale/nl/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/nl/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pl creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pl/LC_MESSAGES copying sphinx/locale/pl/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pl/LC_MESSAGES copying sphinx/locale/pl/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pl/LC_MESSAGES copying sphinx/locale/pl/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pl/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt/LC_MESSAGES copying sphinx/locale/pt/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt/LC_MESSAGES copying sphinx/locale/pt/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt/LC_MESSAGES copying sphinx/locale/pt/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt_BR creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt_BR/LC_MESSAGES copying sphinx/locale/pt_BR/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt_BR/LC_MESSAGES copying sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt_BR/LC_MESSAGES copying sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt_BR/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt_PT creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt_PT/LC_MESSAGES copying sphinx/locale/pt_PT/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt_PT/LC_MESSAGES copying sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt_PT/LC_MESSAGES copying sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/pt_PT/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ro creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ro/LC_MESSAGES copying sphinx/locale/ro/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ro/LC_MESSAGES copying sphinx/locale/ro/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ro/LC_MESSAGES copying sphinx/locale/ro/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ro/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ru creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ru/LC_MESSAGES copying sphinx/locale/ru/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ru/LC_MESSAGES copying sphinx/locale/ru/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ru/LC_MESSAGES copying sphinx/locale/ru/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ru/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/si creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/si/LC_MESSAGES copying sphinx/locale/si/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/si/LC_MESSAGES copying sphinx/locale/si/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/si/LC_MESSAGES copying sphinx/locale/si/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/si/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sk creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sk/LC_MESSAGES copying sphinx/locale/sk/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sk/LC_MESSAGES copying sphinx/locale/sk/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sk/LC_MESSAGES copying sphinx/locale/sk/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sk/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sl creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sl/LC_MESSAGES copying sphinx/locale/sl/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sl/LC_MESSAGES copying sphinx/locale/sl/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sl/LC_MESSAGES copying sphinx/locale/sl/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sl/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sr creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sr/LC_MESSAGES copying sphinx/locale/sr/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sr/LC_MESSAGES copying sphinx/locale/sr/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sr/LC_MESSAGES copying sphinx/locale/sr/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sr/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sr@latin creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sr@latin/LC_MESSAGES copying sphinx/locale/sr@latin/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sr@latin/LC_MESSAGES copying sphinx/locale/sr@latin/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sr@latin/LC_MESSAGES copying sphinx/locale/sr@latin/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sr@latin/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sv creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sv/LC_MESSAGES copying sphinx/locale/sv/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sv/LC_MESSAGES copying sphinx/locale/sv/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sv/LC_MESSAGES copying sphinx/locale/sv/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/sv/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ta creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ta/LC_MESSAGES copying sphinx/locale/ta/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ta/LC_MESSAGES copying sphinx/locale/ta/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ta/LC_MESSAGES copying sphinx/locale/ta/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/ta/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/tr creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/tr/LC_MESSAGES copying sphinx/locale/tr/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/tr/LC_MESSAGES copying sphinx/locale/tr/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/tr/LC_MESSAGES copying sphinx/locale/tr/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/tr/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/uk_UA creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/uk_UA/LC_MESSAGES copying sphinx/locale/uk_UA/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/uk_UA/LC_MESSAGES copying sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/uk_UA/LC_MESSAGES copying sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/uk_UA/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/vi creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/vi/LC_MESSAGES copying sphinx/locale/vi/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/vi/LC_MESSAGES copying sphinx/locale/vi/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/vi/LC_MESSAGES copying sphinx/locale/vi/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/vi/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/zh_CN creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/zh_CN/LC_MESSAGES copying sphinx/locale/zh_CN/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/zh_CN/LC_MESSAGES copying sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/zh_CN/LC_MESSAGES copying sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/zh_CN/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/zh_TW creating /<>/.pybuild/cpython2_2.7/build/sphinx/locale/zh_TW/LC_MESSAGES copying sphinx/locale/zh_TW/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/zh_TW/LC_MESSAGES copying sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/zh_TW/LC_MESSAGES copying sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython2_2.7/build/sphinx/locale/zh_TW/LC_MESSAGES creating /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autosummary/templates creating /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autosummary/templates/autosummary copying sphinx/ext/autosummary/templates/autosummary/base.rst -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autosummary/templates/autosummary copying sphinx/ext/autosummary/templates/autosummary/class.rst -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autosummary/templates/autosummary copying sphinx/ext/autosummary/templates/autosummary/module.rst -> /<>/.pybuild/cpython2_2.7/build/sphinx/ext/autosummary/templates/autosummary I: pybuild base:217: /usr/bin/python3 setup.py build running build running build_py creating /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/config.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/apidoc.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/theming.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/cmdline.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/extension.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/jinja2glue.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/deprecation.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/addnodes.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/pygments_styles.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/io.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/errors.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/events.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/roles.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/setup_command.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/__main__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/versioning.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/quickstart.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/parsers.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/make_mode.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/highlighting.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/registry.py -> /<>/.pybuild/cpython3_3.7/build/sphinx copying sphinx/application.py -> /<>/.pybuild/cpython3_3.7/build/sphinx creating /<>/.pybuild/cpython3_3.7/build/sphinx/directives copying sphinx/directives/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/directives copying sphinx/directives/other.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/directives copying sphinx/directives/patches.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/directives copying sphinx/directives/code.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/directives creating /<>/.pybuild/cpython3_3.7/build/sphinx/testing copying sphinx/testing/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/testing copying sphinx/testing/fixtures.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/testing copying sphinx/testing/util.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/testing copying sphinx/testing/path.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/testing creating /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/html.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/websupport.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/xml.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/devhelp.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/dummy.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/gettext.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/qthelp.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/manpage.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/linkcheck.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/epub3.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/_epub_base.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/applehelp.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/texinfo.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/htmlhelp.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/text.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders copying sphinx/builders/changes.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders creating /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/apidoc.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/inheritance_diagram.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/todo.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/graphviz.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/mathbase.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/imgmath.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/extlinks.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/intersphinx.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/mathjax.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/linkcode.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/ifconfig.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/coverage.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/githubpages.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/autosectionlabel.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/imgconverter.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/doctest.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/viewcode.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext copying sphinx/ext/jsmath.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext creating /<>/.pybuild/cpython3_3.7/build/sphinx/cmd copying sphinx/cmd/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/cmd copying sphinx/cmd/build.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/cmd copying sphinx/cmd/quickstart.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/cmd copying sphinx/cmd/make_mode.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/cmd creating /<>/.pybuild/cpython3_3.7/build/sphinx/websupport copying sphinx/websupport/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/websupport copying sphinx/websupport/errors.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/websupport creating /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/da.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/no.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/tr.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/de.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/zh.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/fi.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/sv.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/jssplitter.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/fr.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/es.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/ro.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/ja.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/en.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/pt.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/hu.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/nl.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/ru.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search copying sphinx/search/it.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/search creating /<>/.pybuild/cpython3_3.7/build/sphinx/writers copying sphinx/writers/html.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/writers copying sphinx/writers/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/writers copying sphinx/writers/websupport.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/writers copying sphinx/writers/xml.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/writers copying sphinx/writers/manpage.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/writers copying sphinx/writers/texinfo.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/writers copying sphinx/writers/text.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/writers copying sphinx/writers/html5.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/writers copying sphinx/writers/latex.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/writers creating /<>/.pybuild/cpython3_3.7/build/sphinx/domains copying sphinx/domains/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/domains copying sphinx/domains/cpp.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/domains copying sphinx/domains/c.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/domains copying sphinx/domains/std.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/domains copying sphinx/domains/python.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/domains copying sphinx/domains/changeset.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/domains copying sphinx/domains/javascript.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/domains copying sphinx/domains/rst.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/domains copying sphinx/domains/math.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/domains creating /<>/.pybuild/cpython3_3.7/build/sphinx/transforms copying sphinx/transforms/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/transforms copying sphinx/transforms/i18n.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/transforms copying sphinx/transforms/references.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/transforms copying sphinx/transforms/compact_bullet_list.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/transforms creating /<>/.pybuild/cpython3_3.7/build/sphinx/pycode copying sphinx/pycode/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/pycode copying sphinx/pycode/parser.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/pycode creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale copying sphinx/locale/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale creating /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/jsonimpl.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/osutil.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/i18n.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/websupport.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/console.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/parallel.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/nodes.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/inspect.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/docutils.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/png.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/logging.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/docfields.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/typing.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/images.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/inventory.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/build_phase.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/jsdump.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/compat.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/tags.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/matching.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/docstrings.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/requests.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/texescape.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/smartypants.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/fileutil.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/rst.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/math.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/template.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util copying sphinx/util/pycompat.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util creating /<>/.pybuild/cpython3_3.7/build/sphinx/environment copying sphinx/environment/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment creating /<>/.pybuild/cpython3_3.7/build/sphinx/builders/latex copying sphinx/builders/latex/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders/latex copying sphinx/builders/latex/nodes.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders/latex copying sphinx/builders/latex/transforms.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/builders/latex creating /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autosummary copying sphinx/ext/autosummary/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autosummary copying sphinx/ext/autosummary/generate.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autosummary creating /<>/.pybuild/cpython3_3.7/build/sphinx/ext/napoleon copying sphinx/ext/napoleon/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/napoleon copying sphinx/ext/napoleon/iterators.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/napoleon copying sphinx/ext/napoleon/docstring.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/napoleon creating /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autodoc copying sphinx/ext/autodoc/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autodoc copying sphinx/ext/autodoc/inspector.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autodoc copying sphinx/ext/autodoc/directive.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autodoc copying sphinx/ext/autodoc/importer.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autodoc creating /<>/.pybuild/cpython3_3.7/build/sphinx/websupport/search copying sphinx/websupport/search/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/websupport/search copying sphinx/websupport/search/whooshsearch.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/websupport/search copying sphinx/websupport/search/xapiansearch.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/websupport/search copying sphinx/websupport/search/nullsearch.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/websupport/search creating /<>/.pybuild/cpython3_3.7/build/sphinx/websupport/storage copying sphinx/websupport/storage/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/websupport/storage copying sphinx/websupport/storage/sqlalchemystorage.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/websupport/storage copying sphinx/websupport/storage/sqlalchemy_db.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/websupport/storage copying sphinx/websupport/storage/differ.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/websupport/storage creating /<>/.pybuild/cpython3_3.7/build/sphinx/transforms/post_transforms copying sphinx/transforms/post_transforms/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/transforms/post_transforms copying sphinx/transforms/post_transforms/images.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/transforms/post_transforms copying sphinx/transforms/post_transforms/code.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/transforms/post_transforms copying sphinx/transforms/post_transforms/compat.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/transforms/post_transforms creating /<>/.pybuild/cpython3_3.7/build/sphinx/util/stemmer copying sphinx/util/stemmer/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util/stemmer copying sphinx/util/stemmer/porter.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/util/stemmer creating /<>/.pybuild/cpython3_3.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/asset.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/dependencies.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/indexentries.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/metadata.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/toctree.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment/collectors copying sphinx/environment/collectors/title.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment/collectors creating /<>/.pybuild/cpython3_3.7/build/sphinx/environment/adapters copying sphinx/environment/adapters/__init__.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment/adapters copying sphinx/environment/adapters/asset.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment/adapters copying sphinx/environment/adapters/indexentries.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment/adapters copying sphinx/environment/adapters/toctree.py -> /<>/.pybuild/cpython3_3.7/build/sphinx/environment/adapters running egg_info writing Sphinx.egg-info/PKG-INFO writing dependency_links to Sphinx.egg-info/dependency_links.txt writing entry points to Sphinx.egg-info/entry_points.txt writing requirements to Sphinx.egg-info/requires.txt writing top-level names to Sphinx.egg-info/top_level.txt reading manifest file 'Sphinx.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' /usr/lib/python3/dist-packages/setuptools/depends.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp /usr/lib/python3/dist-packages/babel/localedata.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import MutableMapping warning: no files found matching 'sphinx-autogen.py' warning: no files found matching 'sphinx-build.py' warning: no files found matching 'sphinx-quickstart.py' warning: no files found matching 'sphinx-apidoc.py' warning: no files found matching 'sphinx/locale/.tx/config' no previously-included directories found matching 'doc/_build' no previously-included directories found matching 'sphinx/locale/.tx' writing manifest file 'Sphinx.egg-info/SOURCES.txt' creating /<>/.pybuild/cpython3_3.7/build/sphinx/templates creating /<>/.pybuild/cpython3_3.7/build/sphinx/templates/epub3 copying sphinx/templates/epub3/container.xml -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/epub3 copying sphinx/templates/epub3/content.opf_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/epub3 copying sphinx/templates/epub3/mimetype -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/epub3 copying sphinx/templates/epub3/nav.xhtml_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/epub3 copying sphinx/templates/epub3/toc.ncx_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/epub3 creating /<>/.pybuild/cpython3_3.7/build/sphinx/templates/graphviz copying sphinx/templates/graphviz/graphviz.css -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/graphviz creating /<>/.pybuild/cpython3_3.7/build/sphinx/templates/latex copying sphinx/templates/latex/latex.tex_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/latex copying sphinx/templates/latex/longtable.tex_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/latex copying sphinx/templates/latex/tabular.tex_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/latex copying sphinx/templates/latex/tabulary.tex_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/latex creating /<>/.pybuild/cpython3_3.7/build/sphinx/templates/qthelp copying sphinx/templates/qthelp/project.qhcp -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/qthelp copying sphinx/templates/qthelp/project.qhp -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/qthelp creating /<>/.pybuild/cpython3_3.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/Makefile.new_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/Makefile_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/conf.py_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/make.bat.new_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/make.bat_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/quickstart copying sphinx/templates/quickstart/master_doc.rst_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/templates/quickstart creating /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/LICRcyr2utf8.xdy -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/LICRlatin2utf8.xdy -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/LatinRules.xdy -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/Makefile_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/footnotehyper-sphinx.sty -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/latexmkjarc -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/latexmkrc_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/make.bat_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/python.ist -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/sphinx.sty -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/sphinx.xdy -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/sphinxhowto.cls -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/sphinxmanual.cls -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs copying sphinx/texinputs/sphinxmulticell.sty -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs creating /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs_win copying sphinx/texinputs_win/Makefile_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/texinputs_win creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/agogo copying sphinx/themes/agogo/layout.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/agogo copying sphinx/themes/agogo/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/agogo creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/agogo/static copying sphinx/themes/agogo/static/agogo.css_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/agogo/static copying sphinx/themes/agogo/static/bgfooter.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/agogo/static copying sphinx/themes/agogo/static/bgtop.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/agogo/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/defindex.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/domainindex.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/genindex-single.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/genindex-split.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/genindex.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/globaltoc.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/layout.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/localtoc.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/opensearch.xml -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/page.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/relations.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/search.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/searchbox.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/searchresults.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/sourcelink.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic copying sphinx/themes/basic/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/changes copying sphinx/themes/basic/changes/frameset.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/changes copying sphinx/themes/basic/changes/rstsource.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/changes copying sphinx/themes/basic/changes/versionchanges.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/changes creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/ajax-loader.gif -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/basic.css_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/comment-bright.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/comment-close.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/comment.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/doctools.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/documentation_options.js_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/down-pressed.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/down.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/file.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/jquery.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/language_data.js_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/minus.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/plus.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/searchtools.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/underscore.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/up-pressed.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/up.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static copying sphinx/themes/basic/static/websupport.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/basic/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/bizstyle copying sphinx/themes/bizstyle/layout.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/bizstyle copying sphinx/themes/bizstyle/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/bizstyle creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/bizstyle/static copying sphinx/themes/bizstyle/static/background_b01.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/bizstyle/static copying sphinx/themes/bizstyle/static/bizstyle.css_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/bizstyle/static copying sphinx/themes/bizstyle/static/bizstyle.js_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/bizstyle/static copying sphinx/themes/bizstyle/static/css3-mediaqueries.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/bizstyle/static copying sphinx/themes/bizstyle/static/css3-mediaqueries_src.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/bizstyle/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/classic copying sphinx/themes/classic/layout.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/classic copying sphinx/themes/classic/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/classic creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/classic/static copying sphinx/themes/classic/static/classic.css_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/classic/static copying sphinx/themes/classic/static/sidebar.js_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/classic/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/default copying sphinx/themes/default/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/default creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/default/static copying sphinx/themes/default/static/default.css -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/default/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/epub copying sphinx/themes/epub/epub-cover.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/epub copying sphinx/themes/epub/layout.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/epub copying sphinx/themes/epub/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/epub creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/epub/static copying sphinx/themes/epub/static/epub.css_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/epub/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/haiku copying sphinx/themes/haiku/layout.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/haiku copying sphinx/themes/haiku/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/haiku creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/haiku/static copying sphinx/themes/haiku/static/alert_info_32.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/haiku/static copying sphinx/themes/haiku/static/alert_warning_32.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/haiku/static copying sphinx/themes/haiku/static/bg-page.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/haiku/static copying sphinx/themes/haiku/static/bullet_orange.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/haiku/static copying sphinx/themes/haiku/static/haiku.css_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/haiku/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/nature copying sphinx/themes/nature/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/nature creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/nature/static copying sphinx/themes/nature/static/nature.css_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/nature/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/nonav copying sphinx/themes/nonav/layout.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/nonav copying sphinx/themes/nonav/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/nonav creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/nonav/static copying sphinx/themes/nonav/static/nonav.css -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/nonav/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid copying sphinx/themes/pyramid/layout.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid copying sphinx/themes/pyramid/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/dialog-note.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/dialog-seealso.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/dialog-todo.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/dialog-topic.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/dialog-warning.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/epub.css -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/footerbg.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/headerbg.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/ie6.css -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/middlebg.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/pyramid.css_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static copying sphinx/themes/pyramid/static/transparent.gif -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/pyramid/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls copying sphinx/themes/scrolls/layout.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls copying sphinx/themes/scrolls/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/artwork copying sphinx/themes/scrolls/artwork/logo.svg -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/artwork creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/darkmetal.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/headerbg.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/logo.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/metal.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/navigation.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/print.css -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/scrolls.css_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/theme_extras.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/watermark.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/static copying sphinx/themes/scrolls/static/watermark_blur.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/scrolls/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/sphinxdoc copying sphinx/themes/sphinxdoc/layout.html -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/sphinxdoc copying sphinx/themes/sphinxdoc/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/sphinxdoc creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/sphinxdoc/static copying sphinx/themes/sphinxdoc/static/contents.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/sphinxdoc/static copying sphinx/themes/sphinxdoc/static/navigation.png -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/sphinxdoc/static copying sphinx/themes/sphinxdoc/static/sphinxdoc.css_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/sphinxdoc/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/traditional copying sphinx/themes/traditional/theme.conf -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/traditional creating /<>/.pybuild/cpython3_3.7/build/sphinx/themes/traditional/static copying sphinx/themes/traditional/static/traditional.css_t -> /<>/.pybuild/cpython3_3.7/build/sphinx/themes/traditional/static creating /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/danish-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/dutch-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/finnish-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/french-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/german-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/hungarian-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/italian-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/norwegian-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/porter-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/portuguese-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/romanian-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/russian-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/spanish-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/swedish-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/search/non-minified-js/turkish-stemmer.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/search/non-minified-js copying sphinx/locale/sphinx.pot -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ar creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ar/LC_MESSAGES copying sphinx/locale/ar/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ar/LC_MESSAGES copying sphinx/locale/ar/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ar/LC_MESSAGES copying sphinx/locale/ar/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ar/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/bn creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/bn/LC_MESSAGES copying sphinx/locale/bn/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/bn/LC_MESSAGES copying sphinx/locale/bn/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/bn/LC_MESSAGES copying sphinx/locale/bn/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/bn/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ca creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ca/LC_MESSAGES copying sphinx/locale/ca/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ca/LC_MESSAGES copying sphinx/locale/ca/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ca/LC_MESSAGES copying sphinx/locale/ca/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ca/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/cs creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/cs/LC_MESSAGES copying sphinx/locale/cs/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/cs/LC_MESSAGES copying sphinx/locale/cs/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/cs/LC_MESSAGES copying sphinx/locale/cs/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/cs/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/cy creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/cy/LC_MESSAGES copying sphinx/locale/cy/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/cy/LC_MESSAGES copying sphinx/locale/cy/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/cy/LC_MESSAGES copying sphinx/locale/cy/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/cy/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/da creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/da/LC_MESSAGES copying sphinx/locale/da/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/da/LC_MESSAGES copying sphinx/locale/da/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/da/LC_MESSAGES copying sphinx/locale/da/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/da/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/de creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/de/LC_MESSAGES copying sphinx/locale/de/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/de/LC_MESSAGES copying sphinx/locale/de/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/de/LC_MESSAGES copying sphinx/locale/de/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/de/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/el creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/el/LC_MESSAGES copying sphinx/locale/el/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/el/LC_MESSAGES copying sphinx/locale/el/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/el/LC_MESSAGES copying sphinx/locale/el/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/el/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/eo creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/eo/LC_MESSAGES copying sphinx/locale/eo/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/eo/LC_MESSAGES copying sphinx/locale/eo/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/eo/LC_MESSAGES copying sphinx/locale/eo/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/eo/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/es creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/es/LC_MESSAGES copying sphinx/locale/es/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/es/LC_MESSAGES copying sphinx/locale/es/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/es/LC_MESSAGES copying sphinx/locale/es/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/es/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/et creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/et/LC_MESSAGES copying sphinx/locale/et/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/et/LC_MESSAGES copying sphinx/locale/et/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/et/LC_MESSAGES copying sphinx/locale/et/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/et/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/eu creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/eu/LC_MESSAGES copying sphinx/locale/eu/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/eu/LC_MESSAGES copying sphinx/locale/eu/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/eu/LC_MESSAGES copying sphinx/locale/eu/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/eu/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fa creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fa/LC_MESSAGES copying sphinx/locale/fa/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fa/LC_MESSAGES copying sphinx/locale/fa/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fa/LC_MESSAGES copying sphinx/locale/fa/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fa/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fi creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fi/LC_MESSAGES copying sphinx/locale/fi/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fi/LC_MESSAGES copying sphinx/locale/fi/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fi/LC_MESSAGES copying sphinx/locale/fi/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fi/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fr creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fr/LC_MESSAGES copying sphinx/locale/fr/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fr/LC_MESSAGES copying sphinx/locale/fr/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fr/LC_MESSAGES copying sphinx/locale/fr/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/fr/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/he creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/he/LC_MESSAGES copying sphinx/locale/he/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/he/LC_MESSAGES copying sphinx/locale/he/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/he/LC_MESSAGES copying sphinx/locale/he/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/he/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hi creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hi/LC_MESSAGES copying sphinx/locale/hi/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hi/LC_MESSAGES copying sphinx/locale/hi/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hi/LC_MESSAGES copying sphinx/locale/hi/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hi/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hi_IN creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hi_IN/LC_MESSAGES copying sphinx/locale/hi_IN/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hi_IN/LC_MESSAGES copying sphinx/locale/hi_IN/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hi_IN/LC_MESSAGES copying sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hi_IN/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hr creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hr/LC_MESSAGES copying sphinx/locale/hr/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hr/LC_MESSAGES copying sphinx/locale/hr/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hr/LC_MESSAGES copying sphinx/locale/hr/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hr/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hu creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hu/LC_MESSAGES copying sphinx/locale/hu/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hu/LC_MESSAGES copying sphinx/locale/hu/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hu/LC_MESSAGES copying sphinx/locale/hu/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/hu/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/id creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/id/LC_MESSAGES copying sphinx/locale/id/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/id/LC_MESSAGES copying sphinx/locale/id/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/id/LC_MESSAGES copying sphinx/locale/id/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/id/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/it creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/it/LC_MESSAGES copying sphinx/locale/it/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/it/LC_MESSAGES copying sphinx/locale/it/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/it/LC_MESSAGES copying sphinx/locale/it/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/it/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ja creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ja/LC_MESSAGES copying sphinx/locale/ja/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ja/LC_MESSAGES copying sphinx/locale/ja/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ja/LC_MESSAGES copying sphinx/locale/ja/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ja/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ko creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ko/LC_MESSAGES copying sphinx/locale/ko/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ko/LC_MESSAGES copying sphinx/locale/ko/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ko/LC_MESSAGES copying sphinx/locale/ko/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ko/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/lt creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/lt/LC_MESSAGES copying sphinx/locale/lt/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/lt/LC_MESSAGES copying sphinx/locale/lt/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/lt/LC_MESSAGES copying sphinx/locale/lt/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/lt/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/lv creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/lv/LC_MESSAGES copying sphinx/locale/lv/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/lv/LC_MESSAGES copying sphinx/locale/lv/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/lv/LC_MESSAGES copying sphinx/locale/lv/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/lv/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/mk creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/mk/LC_MESSAGES copying sphinx/locale/mk/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/mk/LC_MESSAGES copying sphinx/locale/mk/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/mk/LC_MESSAGES copying sphinx/locale/mk/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/mk/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/nb_NO creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/nb_NO/LC_MESSAGES copying sphinx/locale/nb_NO/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/nb_NO/LC_MESSAGES copying sphinx/locale/nb_NO/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/nb_NO/LC_MESSAGES copying sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/nb_NO/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ne creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ne/LC_MESSAGES copying sphinx/locale/ne/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ne/LC_MESSAGES copying sphinx/locale/ne/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ne/LC_MESSAGES copying sphinx/locale/ne/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ne/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/nl creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/nl/LC_MESSAGES copying sphinx/locale/nl/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/nl/LC_MESSAGES copying sphinx/locale/nl/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/nl/LC_MESSAGES copying sphinx/locale/nl/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/nl/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pl creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pl/LC_MESSAGES copying sphinx/locale/pl/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pl/LC_MESSAGES copying sphinx/locale/pl/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pl/LC_MESSAGES copying sphinx/locale/pl/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pl/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt/LC_MESSAGES copying sphinx/locale/pt/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt/LC_MESSAGES copying sphinx/locale/pt/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt/LC_MESSAGES copying sphinx/locale/pt/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt_BR creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt_BR/LC_MESSAGES copying sphinx/locale/pt_BR/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt_BR/LC_MESSAGES copying sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt_BR/LC_MESSAGES copying sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt_BR/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt_PT creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt_PT/LC_MESSAGES copying sphinx/locale/pt_PT/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt_PT/LC_MESSAGES copying sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt_PT/LC_MESSAGES copying sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/pt_PT/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ro creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ro/LC_MESSAGES copying sphinx/locale/ro/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ro/LC_MESSAGES copying sphinx/locale/ro/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ro/LC_MESSAGES copying sphinx/locale/ro/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ro/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ru creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ru/LC_MESSAGES copying sphinx/locale/ru/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ru/LC_MESSAGES copying sphinx/locale/ru/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ru/LC_MESSAGES copying sphinx/locale/ru/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ru/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/si creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/si/LC_MESSAGES copying sphinx/locale/si/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/si/LC_MESSAGES copying sphinx/locale/si/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/si/LC_MESSAGES copying sphinx/locale/si/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/si/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sk creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sk/LC_MESSAGES copying sphinx/locale/sk/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sk/LC_MESSAGES copying sphinx/locale/sk/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sk/LC_MESSAGES copying sphinx/locale/sk/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sk/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sl creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sl/LC_MESSAGES copying sphinx/locale/sl/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sl/LC_MESSAGES copying sphinx/locale/sl/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sl/LC_MESSAGES copying sphinx/locale/sl/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sl/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sr creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sr/LC_MESSAGES copying sphinx/locale/sr/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sr/LC_MESSAGES copying sphinx/locale/sr/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sr/LC_MESSAGES copying sphinx/locale/sr/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sr/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sr@latin creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sr@latin/LC_MESSAGES copying sphinx/locale/sr@latin/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sr@latin/LC_MESSAGES copying sphinx/locale/sr@latin/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sr@latin/LC_MESSAGES copying sphinx/locale/sr@latin/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sr@latin/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sv creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sv/LC_MESSAGES copying sphinx/locale/sv/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sv/LC_MESSAGES copying sphinx/locale/sv/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sv/LC_MESSAGES copying sphinx/locale/sv/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/sv/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ta creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ta/LC_MESSAGES copying sphinx/locale/ta/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ta/LC_MESSAGES copying sphinx/locale/ta/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ta/LC_MESSAGES copying sphinx/locale/ta/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/ta/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/tr creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/tr/LC_MESSAGES copying sphinx/locale/tr/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/tr/LC_MESSAGES copying sphinx/locale/tr/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/tr/LC_MESSAGES copying sphinx/locale/tr/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/tr/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/uk_UA creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/uk_UA/LC_MESSAGES copying sphinx/locale/uk_UA/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/uk_UA/LC_MESSAGES copying sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/uk_UA/LC_MESSAGES copying sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/uk_UA/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/vi creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/vi/LC_MESSAGES copying sphinx/locale/vi/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/vi/LC_MESSAGES copying sphinx/locale/vi/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/vi/LC_MESSAGES copying sphinx/locale/vi/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/vi/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/zh_CN creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/zh_CN/LC_MESSAGES copying sphinx/locale/zh_CN/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/zh_CN/LC_MESSAGES copying sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/zh_CN/LC_MESSAGES copying sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/zh_CN/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/zh_TW creating /<>/.pybuild/cpython3_3.7/build/sphinx/locale/zh_TW/LC_MESSAGES copying sphinx/locale/zh_TW/LC_MESSAGES/sphinx.js -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/zh_TW/LC_MESSAGES copying sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/zh_TW/LC_MESSAGES copying sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po -> /<>/.pybuild/cpython3_3.7/build/sphinx/locale/zh_TW/LC_MESSAGES creating /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autosummary/templates creating /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autosummary/templates/autosummary copying sphinx/ext/autosummary/templates/autosummary/base.rst -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autosummary/templates/autosummary copying sphinx/ext/autosummary/templates/autosummary/class.rst -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autosummary/templates/autosummary copying sphinx/ext/autosummary/templates/autosummary/module.rst -> /<>/.pybuild/cpython3_3.7/build/sphinx/ext/autosummary/templates/autosummary PYTHONPATH=/<>/.pybuild/cpython3_3.7/build python3 ./sphinx/cmd/build.py -T doc build/html/ Running Sphinx v1.8.5 making output directory... building [mo]: targets for 0 po files that are out of date building [html]: targets for 68 source files that are out of date updating environment: 68 added, 0 changed, 0 removed reading sources... [ 1%] authors reading sources... [ 2%] changes reading sources... [ 4%] contents reading sources... [ 5%] develop reading sources... [ 7%] devguide reading sources... [ 8%] examples reading sources... [ 10%] extdev/appapi reading sources... [ 11%] extdev/builderapi reading sources... [ 13%] extdev/collectorapi reading sources... [ 14%] extdev/domainapi reading sources... [ 16%] extdev/envapi reading sources... [ 17%] extdev/i18n reading sources... [ 19%] extdev/index reading sources... [ 20%] extdev/logging reading sources... [ 22%] extdev/markupapi reading sources... [ 23%] extdev/nodes reading sources... [ 25%] extdev/parserapi reading sources... [ 26%] extdev/tutorial reading sources... [ 27%] extdev/utils reading sources... [ 29%] faq reading sources... [ 30%] glossary reading sources... [ 32%] intl reading sources... [ 33%] intro reading sources... [ 35%] latex reading sources... [ 36%] man/index reading sources... [ 38%] man/sphinx-apidoc reading sources... [ 39%] man/sphinx-autogen reading sources... [ 41%] man/sphinx-build reading sources... [ 42%] man/sphinx-quickstart reading sources... [ 44%] setuptools reading sources... [ 45%] templating reading sources... [ 47%] theming reading sources... [ 48%] usage/builders/index reading sources... [ 50%] usage/configuration reading sources... [ 51%] usage/extensions/autodoc reading sources... [ 52%] usage/extensions/autosectionlabel reading sources... [ 54%] usage/extensions/autosummary reading sources... [ 55%] usage/extensions/coverage reading sources... [ 57%] usage/extensions/doctest reading sources... [ 58%] usage/extensions/example_google reading sources... [ 60%] usage/extensions/example_numpy reading sources... [ 61%] usage/extensions/extlinks reading sources... [ 63%] usage/extensions/githubpages reading sources... [ 64%] usage/extensions/graphviz reading sources... [ 66%] usage/extensions/ifconfig reading sources... [ 67%] usage/extensions/imgconverter reading sources... [ 69%] usage/extensions/index reading sources... [ 70%] usage/extensions/inheritance reading sources... [ 72%] usage/extensions/intersphinx reading sources... [ 73%] usage/extensions/linkcode reading sources... [ 75%] usage/extensions/math reading sources... [ 76%] usage/extensions/napoleon reading sources... [ 77%] usage/extensions/todo reading sources... [ 79%] usage/extensions/viewcode reading sources... [ 80%] usage/installation reading sources... [ 82%] usage/markdown reading sources... [ 83%] usage/quickstart reading sources... [ 85%] usage/restructuredtext/basics reading sources... [ 86%] usage/restructuredtext/directives reading sources... [ 88%] usage/restructuredtext/domains reading sources... [ 89%] usage/restructuredtext/field-lists reading sources... [ 91%] usage/restructuredtext/index reading sources... [ 92%] usage/restructuredtext/roles reading sources... [ 94%] web/api reading sources... [ 95%] web/quickstart reading sources... [ 97%] web/searchadapters reading sources... [ 98%] web/storagebackends reading sources... [100%] websupport looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 1%] authors writing output... [ 2%] changes writing output... [ 4%] contents writing output... [ 5%] develop writing output... [ 7%] devguide writing output... [ 8%] examples writing output... [ 10%] extdev/appapi writing output... [ 11%] extdev/builderapi writing output... [ 13%] extdev/collectorapi writing output... [ 14%] extdev/domainapi writing output... [ 16%] extdev/envapi writing output... [ 17%] extdev/i18n writing output... [ 19%] extdev/index writing output... [ 20%] extdev/logging writing output... [ 22%] extdev/markupapi writing output... [ 23%] extdev/nodes writing output... [ 25%] extdev/parserapi writing output... [ 26%] extdev/tutorial writing output... [ 27%] extdev/utils writing output... [ 29%] faq writing output... [ 30%] glossary writing output... [ 32%] intl writing output... [ 33%] intro writing output... [ 35%] latex writing output... [ 36%] man/index writing output... [ 38%] man/sphinx-apidoc writing output... [ 39%] man/sphinx-autogen writing output... [ 41%] man/sphinx-build writing output... [ 42%] man/sphinx-quickstart writing output... [ 44%] setuptools writing output... [ 45%] templating writing output... [ 47%] theming writing output... [ 48%] usage/builders/index writing output... [ 50%] usage/configuration writing output... [ 51%] usage/extensions/autodoc writing output... [ 52%] usage/extensions/autosectionlabel writing output... [ 54%] usage/extensions/autosummary writing output... [ 55%] usage/extensions/coverage writing output... [ 57%] usage/extensions/doctest writing output... [ 58%] usage/extensions/example_google writing output... [ 60%] usage/extensions/example_numpy writing output... [ 61%] usage/extensions/extlinks writing output... [ 63%] usage/extensions/githubpages writing output... [ 64%] usage/extensions/graphviz writing output... [ 66%] usage/extensions/ifconfig writing output... [ 67%] usage/extensions/imgconverter writing output... [ 69%] usage/extensions/index writing output... [ 70%] usage/extensions/inheritance writing output... [ 72%] usage/extensions/intersphinx writing output... [ 73%] usage/extensions/linkcode writing output... [ 75%] usage/extensions/math writing output... [ 76%] usage/extensions/napoleon writing output... [ 77%] usage/extensions/todo writing output... [ 79%] usage/extensions/viewcode writing output... [ 80%] usage/installation writing output... [ 82%] usage/markdown writing output... [ 83%] usage/quickstart writing output... [ 85%] usage/restructuredtext/basics writing output... [ 86%] usage/restructuredtext/directives writing output... [ 88%] usage/restructuredtext/domains writing output... [ 89%] usage/restructuredtext/field-lists writing output... [ 91%] usage/restructuredtext/index writing output... [ 92%] usage/restructuredtext/roles writing output... [ 94%] web/api writing output... [ 95%] web/quickstart writing output... [ 97%] web/searchadapters writing output... [ 98%] web/storagebackends writing output... [100%] websupport generating indices... genindex py-modindex highlighting module code... [ 2%] docutils.parsers.rst highlighting module code... [ 5%] logging highlighting module code... [ 8%] sphinx.addnodes highlighting module code... [ 11%] sphinx.application highlighting module code... [ 13%] sphinx.builders highlighting module code... [ 16%] sphinx.builders.applehelp highlighting module code... [ 19%] sphinx.builders.changes highlighting module code... [ 22%] sphinx.builders.devhelp highlighting module code... [ 25%] sphinx.builders.dummy highlighting module code... [ 27%] sphinx.builders.epub3 highlighting module code... [ 30%] sphinx.builders.gettext highlighting module code... [ 33%] sphinx.builders.html highlighting module code... [ 36%] sphinx.builders.htmlhelp highlighting module code... [ 38%] sphinx.builders.latex highlighting module code... [ 41%] sphinx.builders.linkcheck highlighting module code... [ 44%] sphinx.builders.manpage highlighting module code... [ 47%] sphinx.builders.qthelp highlighting module code... [ 50%] sphinx.builders.texinfo highlighting module code... [ 52%] sphinx.builders.text highlighting module code... [ 55%] sphinx.builders.xml highlighting module code... [ 58%] sphinx.config highlighting module code... [ 61%] sphinx.domains highlighting module code... [ 63%] sphinx.environment highlighting module code... [ 66%] sphinx.environment.collectors highlighting module code... [ 69%] sphinx.errors highlighting module code... [ 72%] sphinx.ext.autodoc highlighting module code... [ 75%] sphinx.ext.coverage highlighting module code... [ 77%] sphinx.locale highlighting module code... [ 80%] sphinx.parsers highlighting module code... [ 83%] sphinx.transforms highlighting module code... [ 86%] sphinx.transforms.post_transforms.images highlighting module code... [ 88%] sphinx.util.docutils highlighting module code... [ 91%] sphinx.util.logging highlighting module code... [ 94%] sphinxcontrib.websupport.core highlighting module code... [ 97%] sphinxcontrib.websupport.search highlighting module code... [100%] sphinxcontrib.websupport.storage writing additional pages... index search opensearch copying images... [ 7%] translation.png copying images... [ 15%] themes/alabaster.png copying images... [ 23%] themes/classic.png copying images... [ 30%] themes/sphinxdoc.png copying images... [ 38%] themes/scrolls.png copying images... [ 46%] themes/agogo.png copying images... [ 53%] themes/traditional.png copying images... [ 61%] themes/nature.png copying images... [ 69%] themes/haiku.png copying images... [ 76%] themes/pyramid.png copying images... [ 84%] themes/bizstyle.png copying images... [ 92%] themes/sphinx_rtd_theme.png copying images... [100%] _static/more.png copying downloadable files... [ 50%] usage/extensions/example_google.py copying downloadable files... [100%] usage/extensions/example_numpy.py copying static files... done copying extra files... done dumping search index in English (code: en) ... done dumping object inventory... done build succeeded. The HTML pages are in build/html. /usr/lib/python3/dist-packages/babel/localedata.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import MutableMapping /usr/lib/python3/dist-packages/jinja2/runtime.py:318: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import Mapping /usr/lib/python3/dist-packages/jinja2/sandbox.py:82: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import MutableSet, MutableMapping, MutableSequence find build/html/ -name '*.txt' -or -name '*.html' | xargs -L1 sed -i \ 's!http://docutils.sourceforge.net/docs/!file:///usr/share/doc/docutils-doc/docs/!g' PYTHONPATH=/<>/.pybuild/cpython3_3.7/build python3 ./sphinx/cmd/build.py -T -b man doc build/man Running Sphinx v1.8.5 making output directory... building [mo]: targets for 0 po files that are out of date building [man]: all manpages updating environment: 68 added, 0 changed, 0 removed reading sources... [ 1%] authors reading sources... [ 2%] changes reading sources... [ 4%] contents reading sources... [ 5%] develop reading sources... [ 7%] devguide reading sources... [ 8%] examples reading sources... [ 10%] extdev/appapi reading sources... [ 11%] extdev/builderapi reading sources... [ 13%] extdev/collectorapi reading sources... [ 14%] extdev/domainapi reading sources... [ 16%] extdev/envapi reading sources... [ 17%] extdev/i18n reading sources... [ 19%] extdev/index reading sources... [ 20%] extdev/logging reading sources... [ 22%] extdev/markupapi reading sources... [ 23%] extdev/nodes reading sources... [ 25%] extdev/parserapi reading sources... [ 26%] extdev/tutorial reading sources... [ 27%] extdev/utils reading sources... [ 29%] faq reading sources... [ 30%] glossary reading sources... [ 32%] intl reading sources... [ 33%] intro reading sources... [ 35%] latex reading sources... [ 36%] man/index reading sources... [ 38%] man/sphinx-apidoc reading sources... [ 39%] man/sphinx-autogen reading sources... [ 41%] man/sphinx-build reading sources... [ 42%] man/sphinx-quickstart reading sources... [ 44%] setuptools reading sources... [ 45%] templating reading sources... [ 47%] theming reading sources... [ 48%] usage/builders/index reading sources... [ 50%] usage/configuration reading sources... [ 51%] usage/extensions/autodoc reading sources... [ 52%] usage/extensions/autosectionlabel reading sources... [ 54%] usage/extensions/autosummary reading sources... [ 55%] usage/extensions/coverage reading sources... [ 57%] usage/extensions/doctest reading sources... [ 58%] usage/extensions/example_google reading sources... [ 60%] usage/extensions/example_numpy reading sources... [ 61%] usage/extensions/extlinks reading sources... [ 63%] usage/extensions/githubpages reading sources... [ 64%] usage/extensions/graphviz reading sources... [ 66%] usage/extensions/ifconfig reading sources... [ 67%] usage/extensions/imgconverter reading sources... [ 69%] usage/extensions/index reading sources... [ 70%] usage/extensions/inheritance reading sources... [ 72%] usage/extensions/intersphinx reading sources... [ 73%] usage/extensions/linkcode reading sources... [ 75%] usage/extensions/math reading sources... [ 76%] usage/extensions/napoleon reading sources... [ 77%] usage/extensions/todo reading sources... [ 79%] usage/extensions/viewcode reading sources... [ 80%] usage/installation reading sources... [ 82%] usage/markdown reading sources... [ 83%] usage/quickstart reading sources... [ 85%] usage/restructuredtext/basics reading sources... [ 86%] usage/restructuredtext/directives reading sources... [ 88%] usage/restructuredtext/domains reading sources... [ 89%] usage/restructuredtext/field-lists reading sources... [ 91%] usage/restructuredtext/index reading sources... [ 92%] usage/restructuredtext/roles reading sources... [ 94%] web/api reading sources... [ 95%] web/quickstart reading sources... [ 97%] web/searchadapters reading sources... [ 98%] web/storagebackends reading sources... [100%] websupport looking for now-outdated files... none found pickling environment... done checking consistency... done writing... sphinx-all.1 { usage/installation usage/quickstart usage/restructuredtext/index usage/restructuredtext/basics usage/restructuredtext/roles usage/restructuredtext/directives usage/restructuredtext/field-lists usage/restructuredtext/domains usage/markdown usage/configuration usage/builders/index usage/extensions/index usage/extensions/autodoc usage/extensions/autosectionlabel usage/extensions/autosummary usage/extensions/coverage usage/extensions/doctest usage/extensions/extlinks usage/extensions/githubpages usage/extensions/graphviz usage/extensions/ifconfig usage/extensions/imgconverter usage/extensions/inheritance usage/extensions/intersphinx usage/extensions/linkcode usage/extensions/math usage/extensions/napoleon usage/extensions/todo usage/extensions/viewcode intro man/index man/sphinx-quickstart man/sphinx-build man/sphinx-apidoc man/sphinx-autogen intl theming setuptools templating latex extdev/index extdev/tutorial extdev/appapi extdev/envapi extdev/builderapi extdev/collectorapi extdev/markupapi extdev/domainapi extdev/parserapi extdev/nodes extdev/logging extdev/i18n extdev/utils websupport web/quickstart web/api web/searchadapters web/storagebackends faq glossary devguide changes examples authors } sphinx-build.1 { } sphinx-quickstart.1 { } sphinx-apidoc.1 { } sphinx-autogen.1 { } build succeeded. The manual pages are in build/man. /usr/lib/python3/dist-packages/babel/localedata.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import MutableMapping /usr/lib/python3/dist-packages/jinja2/runtime.py:318: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import Mapping /usr/lib/python3/dist-packages/jinja2/sandbox.py:82: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import MutableSet, MutableMapping, MutableSequence PYTHONPATH=/<>/.pybuild/cpython3_3.7/build python3 setup.py compile_catalog running compile_catalog compiling catalog sphinx/locale/sk/LC_MESSAGES/sphinx.po to sphinx/locale/sk/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/cs/LC_MESSAGES/sphinx.po to sphinx/locale/cs/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/si/LC_MESSAGES/sphinx.po to sphinx/locale/si/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/it/LC_MESSAGES/sphinx.po to sphinx/locale/it/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/tr/LC_MESSAGES/sphinx.po to sphinx/locale/tr/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/sr/LC_MESSAGES/sphinx.po to sphinx/locale/sr/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po to sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/fa/LC_MESSAGES/sphinx.po to sphinx/locale/fa/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po to sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/fi/LC_MESSAGES/sphinx.po to sphinx/locale/fi/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/ko/LC_MESSAGES/sphinx.po to sphinx/locale/ko/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/pt/LC_MESSAGES/sphinx.po to sphinx/locale/pt/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/fr/LC_MESSAGES/sphinx.po to sphinx/locale/fr/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/he/LC_MESSAGES/sphinx.po to sphinx/locale/he/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po to sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/vi/LC_MESSAGES/sphinx.po to sphinx/locale/vi/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/id/LC_MESSAGES/sphinx.po to sphinx/locale/id/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/ca/LC_MESSAGES/sphinx.po to sphinx/locale/ca/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po to sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/da/LC_MESSAGES/sphinx.po to sphinx/locale/da/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/ru/LC_MESSAGES/sphinx.po to sphinx/locale/ru/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/hr/LC_MESSAGES/sphinx.po to sphinx/locale/hr/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po to sphinx/locale/hi_IN/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/mk/LC_MESSAGES/sphinx.po to sphinx/locale/mk/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/lt/LC_MESSAGES/sphinx.po to sphinx/locale/lt/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/sr@latin/LC_MESSAGES/sphinx.po to sphinx/locale/sr@latin/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/de/LC_MESSAGES/sphinx.po to sphinx/locale/de/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/pl/LC_MESSAGES/sphinx.po to sphinx/locale/pl/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/sl/LC_MESSAGES/sphinx.po to sphinx/locale/sl/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/nl/LC_MESSAGES/sphinx.po to sphinx/locale/nl/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/bn/LC_MESSAGES/sphinx.po to sphinx/locale/bn/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/sv/LC_MESSAGES/sphinx.po to sphinx/locale/sv/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/ar/LC_MESSAGES/sphinx.po to sphinx/locale/ar/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/ne/LC_MESSAGES/sphinx.po to sphinx/locale/ne/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/hu/LC_MESSAGES/sphinx.po to sphinx/locale/hu/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/cy/LC_MESSAGES/sphinx.po to sphinx/locale/cy/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po to sphinx/locale/nb_NO/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/et/LC_MESSAGES/sphinx.po to sphinx/locale/et/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po to sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/hi/LC_MESSAGES/sphinx.po to sphinx/locale/hi/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/ta/LC_MESSAGES/sphinx.po to sphinx/locale/ta/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/el/LC_MESSAGES/sphinx.po to sphinx/locale/el/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/eu/LC_MESSAGES/sphinx.po to sphinx/locale/eu/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/ja/LC_MESSAGES/sphinx.po to sphinx/locale/ja/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/ro/LC_MESSAGES/sphinx.po to sphinx/locale/ro/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/eo/LC_MESSAGES/sphinx.po to sphinx/locale/eo/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/es/LC_MESSAGES/sphinx.po to sphinx/locale/es/LC_MESSAGES/sphinx.mo compiling catalog sphinx/locale/lv/LC_MESSAGES/sphinx.po to sphinx/locale/lv/LC_MESSAGES/sphinx.mo writing JavaScript strings in catalog 'sphinx/locale/sk/LC_MESSAGES/sphinx.po' to 'sphinx/locale/sk/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/cs/LC_MESSAGES/sphinx.po' to 'sphinx/locale/cs/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/si/LC_MESSAGES/sphinx.po' to 'sphinx/locale/si/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/it/LC_MESSAGES/sphinx.po' to 'sphinx/locale/it/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/tr/LC_MESSAGES/sphinx.po' to 'sphinx/locale/tr/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/sr/LC_MESSAGES/sphinx.po' to 'sphinx/locale/sr/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po' to 'sphinx/locale/pt_BR/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/fa/LC_MESSAGES/sphinx.po' to 'sphinx/locale/fa/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po' to 'sphinx/locale/uk_UA/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/fi/LC_MESSAGES/sphinx.po' to 'sphinx/locale/fi/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/ko/LC_MESSAGES/sphinx.po' to 'sphinx/locale/ko/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/pt/LC_MESSAGES/sphinx.po' to 'sphinx/locale/pt/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/fr/LC_MESSAGES/sphinx.po' to 'sphinx/locale/fr/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/he/LC_MESSAGES/sphinx.po' to 'sphinx/locale/he/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po' to 'sphinx/locale/zh_CN/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/vi/LC_MESSAGES/sphinx.po' to 'sphinx/locale/vi/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/id/LC_MESSAGES/sphinx.po' to 'sphinx/locale/id/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/ca/LC_MESSAGES/sphinx.po' to 'sphinx/locale/ca/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po' to 'sphinx/locale/pt_PT/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/da/LC_MESSAGES/sphinx.po' to 'sphinx/locale/da/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/ru/LC_MESSAGES/sphinx.po' to 'sphinx/locale/ru/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/hr/LC_MESSAGES/sphinx.po' to 'sphinx/locale/hr/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po' to 'sphinx/locale/hi_IN/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/mk/LC_MESSAGES/sphinx.po' to 'sphinx/locale/mk/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/lt/LC_MESSAGES/sphinx.po' to 'sphinx/locale/lt/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/sr@latin/LC_MESSAGES/sphinx.po' to 'sphinx/locale/sr@latin/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/de/LC_MESSAGES/sphinx.po' to 'sphinx/locale/de/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/pl/LC_MESSAGES/sphinx.po' to 'sphinx/locale/pl/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/sl/LC_MESSAGES/sphinx.po' to 'sphinx/locale/sl/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/nl/LC_MESSAGES/sphinx.po' to 'sphinx/locale/nl/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/bn/LC_MESSAGES/sphinx.po' to 'sphinx/locale/bn/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/sv/LC_MESSAGES/sphinx.po' to 'sphinx/locale/sv/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/ar/LC_MESSAGES/sphinx.po' to 'sphinx/locale/ar/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/ne/LC_MESSAGES/sphinx.po' to 'sphinx/locale/ne/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/hu/LC_MESSAGES/sphinx.po' to 'sphinx/locale/hu/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/cy/LC_MESSAGES/sphinx.po' to 'sphinx/locale/cy/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po' to 'sphinx/locale/nb_NO/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/et/LC_MESSAGES/sphinx.po' to 'sphinx/locale/et/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po' to 'sphinx/locale/zh_TW/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/hi/LC_MESSAGES/sphinx.po' to 'sphinx/locale/hi/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/ta/LC_MESSAGES/sphinx.po' to 'sphinx/locale/ta/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/el/LC_MESSAGES/sphinx.po' to 'sphinx/locale/el/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/eu/LC_MESSAGES/sphinx.po' to 'sphinx/locale/eu/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/ja/LC_MESSAGES/sphinx.po' to 'sphinx/locale/ja/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/ro/LC_MESSAGES/sphinx.po' to 'sphinx/locale/ro/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/eo/LC_MESSAGES/sphinx.po' to 'sphinx/locale/eo/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/es/LC_MESSAGES/sphinx.po' to 'sphinx/locale/es/LC_MESSAGES/sphinx.js' writing JavaScript strings in catalog 'sphinx/locale/lv/LC_MESSAGES/sphinx.po' to 'sphinx/locale/lv/LC_MESSAGES/sphinx.js' /usr/lib/python3/dist-packages/setuptools/depends.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp /usr/lib/python3/dist-packages/babel/localedata.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import MutableMapping make[1]: Leaving directory '/<>' dh_auto_test -O--buildsystem=pybuild I: pybuild base:217: cd /<>/.pybuild/cpython2_2.7/build; python2.7 -m pytest --verbose --ignore tests/test_websupport.py --ignore tests/test_api_translator.py Temporary files will be placed in /<>/tests/build. ============================= test session starts ============================== platform linux2 -- Python 2.7.16, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 -- /usr/bin/python2.7 cachedir: .pytest_cache libraries: Sphinx-1.8.5, docutils-0.14 rootdir: /<>, inifile: setup.cfg collecting ... collected 1337 items tests/test_application.py::test_events PASSED [ 0%] tests/test_application.py::test_emit_with_nonascii_name_node PASSED [ 0%] tests/test_application.py::test_extensions PASSED [ 0%] tests/test_application.py::test_extension_in_blacklist PASSED [ 0%] tests/test_application.py::test_add_source_parser PASSED [ 0%] tests/test_application.py::test_add_is_parallel_allowed PASSED [ 0%] tests/test_autodoc.py::test_parse_name PASSED [ 0%] tests/test_autodoc.py::test_format_signature PASSED [ 0%] tests/test_autodoc.py::test_get_doc PASSED [ 0%] tests/test_autodoc.py::test_docstring_processing PASSED [ 0%] tests/test_autodoc.py::test_new_documenter PASSED [ 0%] tests/test_autodoc.py::test_attrgetter_using PASSED [ 0%] tests/test_autodoc.py::test_generate PASSED [ 0%] tests/test_autodoc.py::test_autodoc_exception PASSED [ 1%] tests/test_autodoc.py::test_autodoc_warnings PASSED [ 1%] tests/test_autodoc.py::test_autodoc_attributes PASSED [ 1%] tests/test_autodoc.py::test_autodoc_members PASSED [ 1%] tests/test_autodoc.py::test_autodoc_exclude_members PASSED [ 1%] tests/test_autodoc.py::test_autodoc_undoc_members PASSED [ 1%] tests/test_autodoc.py::test_autodoc_inherited_members PASSED [ 1%] tests/test_autodoc.py::test_autodoc_imported_members PASSED [ 1%] tests/test_autodoc.py::test_autodoc_special_members PASSED [ 1%] tests/test_autodoc.py::test_autodoc_ignore_module_all PASSED [ 1%] tests/test_autodoc.py::test_autodoc_noindex PASSED [ 1%] tests/test_autodoc.py::test_autodoc_subclass_of_builtin_class PASSED [ 1%] tests/test_autodoc.py::test_autodoc_inner_class PASSED [ 1%] tests/test_autodoc.py::test_autodoc_descriptor PASSED [ 2%] tests/test_autodoc.py::test_autodoc_c_module PASSED [ 2%] tests/test_autodoc.py::test_autodoc_member_order PASSED [ 2%] tests/test_autodoc.py::test_autodoc_module_scope PASSED [ 2%] tests/test_autodoc.py::test_autodoc_class_scope PASSED [ 2%] tests/test_autodoc.py::test_autodoc_docstring_signature PASSED [ 2%] tests/test_autodoc.py::test_class_attributes PASSED [ 2%] tests/test_autodoc.py::test_instance_attributes PASSED [ 2%] tests/test_autodoc.py::test_enum_class PASSED [ 2%] tests/test_autodoc.py::test_descriptor_class PASSED [ 2%] tests/test_autodoc.py::test_autofunction_for_callable PASSED [ 2%] tests/test_autodoc.py::test_autofunction_for_method PASSED [ 2%] tests/test_autodoc.py::test_mocked_module_imports PASSED [ 2%] tests/test_autodoc.py::test_partialfunction PASSED [ 2%] tests/test_autodoc.py::test_partialmethod SKIPPED [ 3%] tests/test_autodoc.py::test_merge_autodoc_default_flags1 PASSED [ 3%] tests/test_autodoc.py::test_merge_autodoc_default_flags2 PASSED [ 3%] tests/test_autodoc.py::test_autodoc_default_options PASSED [ 3%] tests/test_autodoc.py::test_autodoc_default_options_with_values PASSED [ 3%] tests/test_autodoc.py::test_autodoc_for_egged_code PASSED [ 3%] tests/test_build.py::test_build_all[dirhtml] ERROR [ 3%] tests/test_build.py::test_build_all[singlehtml] ERROR [ 3%] tests/test_build.py::test_build_all[pickle] ERROR [ 3%] tests/test_build.py::test_build_all[json] ERROR [ 3%] tests/test_build.py::test_build_all[text] ERROR [ 3%] tests/test_build.py::test_build_all[htmlhelp] ERROR [ 3%] tests/test_build.py::test_build_all[qthelp] ERROR [ 3%] tests/test_build.py::test_build_all[applehelp] ERROR [ 4%] tests/test_build.py::test_build_all[xml] ERROR [ 4%] tests/test_build.py::test_build_all[pseudoxml] ERROR [ 4%] tests/test_build.py::test_build_all[linkcheck] ERROR [ 4%] tests/test_build.py::test_master_doc_not_found FAILED [ 4%] tests/test_build.py::test_circular_toctree FAILED [ 4%] tests/test_build.py::test_numbered_circular_toctree FAILED [ 4%] tests/test_build.py::test_image_glob PASSED [ 4%] tests/test_build_applehelp.py::test_applehelp_output FAILED [ 4%] tests/test_build_changes.py::test_build FAILED [ 4%] tests/test_build_changes.py::test_no_changes PASSED [ 4%] tests/test_build_epub.py::test_build_epub FAILED [ 4%] tests/test_build_epub.py::test_epub_cover FAILED [ 4%] tests/test_build_epub.py::test_nested_toc FAILED [ 5%] tests/test_build_epub.py::test_escaped_toc FAILED [ 5%] tests/test_build_epub.py::test_epub_writing_mode FAILED [ 5%] tests/test_build_epub.py::test_epub_anchor_id FAILED [ 5%] tests/test_build_epub.py::test_epub_assets FAILED [ 5%] tests/test_build_epub.py::test_epub_css_files FAILED [ 5%] tests/test_build_epub.py::test_html_download_role FAILED [ 5%] tests/test_build_epub.py::test_run_epubcheck SKIPPED [ 5%] tests/test_build_gettext.py::test_build_gettext FAILED [ 5%] tests/test_build_gettext.py::test_msgfmt PASSED [ 5%] tests/test_build_gettext.py::test_gettext_index_entries FAILED [ 5%] tests/test_build_gettext.py::test_gettext_disable_index_entries FAILED [ 5%] tests/test_build_gettext.py::test_gettext_template FAILED [ 5%] tests/test_build_gettext.py::test_gettext_template_msgid_order_in_sphinxpot FAILED [ 5%] tests/test_build_html.py::test_html_warnings FAILED [ 6%] tests/test_build_html.py::test_html_output[autodoc.html-expect0] FAILED [ 6%] tests/test_build_html.py::test_html_output[autodoc.html-expect1] FAILED [ 6%] tests/test_build_html.py::test_html_output[autodoc.html-expect2] FAILED [ 6%] tests/test_build_html.py::test_html_output[extapi.html-expect3] FAILED [ 6%] tests/test_build_html.py::test_html_output[markup.html-expect4] FAILED [ 6%] tests/test_build_html.py::test_html_output[markup.html-expect5] FAILED [ 6%] tests/test_build_html.py::test_html_output[markup.html-expect6] FAILED [ 6%] tests/test_build_html.py::test_html_output[markup.html-expect7] FAILED [ 6%] tests/test_build_html.py::test_html_output[markup.html-expect8] FAILED [ 6%] tests/test_build_html.py::test_html_output[markup.html-expect9] FAILED [ 6%] tests/test_build_html.py::test_html_output[markup.html-expect10] FAILED [ 6%] tests/test_build_html.py::test_html_output[markup.html-expect11] FAILED [ 6%] tests/test_build_html.py::test_html_output[markup.html-expect12] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect13] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect14] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect15] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect16] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect17] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect18] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect19] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect20] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect21] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect22] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect23] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect24] FAILED [ 7%] tests/test_build_html.py::test_html_output[markup.html-expect25] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect26] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect27] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect28] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect29] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect30] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect31] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect32] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect33] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect34] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect35] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect36] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect37] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect38] FAILED [ 8%] tests/test_build_html.py::test_html_output[markup.html-expect39] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect40] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect41] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect42] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect43] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect44] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect45] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect46] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect47] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect48] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect49] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect50] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect51] FAILED [ 9%] tests/test_build_html.py::test_html_output[markup.html-expect52] FAILED [ 10%] tests/test_build_html.py::test_html_output[markup.html-expect53] FAILED [ 10%] tests/test_build_html.py::test_html_output[markup.html-expect54] FAILED [ 10%] tests/test_build_html.py::test_html_output[markup.html-expect55] FAILED [ 10%] tests/test_build_html.py::test_html_output[markup.html-expect56] FAILED [ 10%] tests/test_build_html.py::test_html_output[markup.html-expect57] FAILED [ 10%] tests/test_build_html.py::test_html_output[markup.html-expect58] FAILED [ 10%] tests/test_build_html.py::test_html_output[markup.html-expect59] FAILED [ 10%] tests/test_build_html.py::test_html_output[includes.html-expect60] FAILED [ 10%] tests/test_build_html.py::test_html_output[includes.html-expect61] FAILED [ 10%] tests/test_build_html.py::test_html_output[includes.html-expect62] FAILED [ 10%] tests/test_build_html.py::test_html_output[includes.html-expect63] FAILED [ 10%] tests/test_build_html.py::test_html_output[includes.html-expect64] FAILED [ 10%] tests/test_build_html.py::test_html_output[includes.html-expect65] FAILED [ 10%] tests/test_build_html.py::test_html_output[includes.html-expect66] FAILED [ 11%] tests/test_build_html.py::test_html_output[includes.html-expect67] FAILED [ 11%] tests/test_build_html.py::test_html_output[includes.html-expect68] FAILED [ 11%] tests/test_build_html.py::test_html_output[includes.html-expect69] FAILED [ 11%] tests/test_build_html.py::test_html_output[includes.html-expect70] FAILED [ 11%] tests/test_build_html.py::test_html_output[includes.html-expect71] FAILED [ 11%] tests/test_build_html.py::test_html_output[includes.html-expect72] FAILED [ 11%] tests/test_build_html.py::test_html_output[objects.html-expect73] FAILED [ 11%] tests/test_build_html.py::test_html_output[objects.html-expect74] FAILED [ 11%] tests/test_build_html.py::test_html_output[objects.html-expect75] FAILED [ 11%] tests/test_build_html.py::test_html_output[objects.html-expect76] FAILED [ 11%] tests/test_build_html.py::test_html_output[objects.html-expect77] FAILED [ 11%] tests/test_build_html.py::test_html_output[objects.html-expect78] FAILED [ 11%] tests/test_build_html.py::test_html_output[objects.html-expect79] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect80] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect81] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect82] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect83] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect84] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect85] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect86] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect87] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect88] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect89] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect90] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect91] FAILED [ 12%] tests/test_build_html.py::test_html_output[objects.html-expect92] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect93] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect94] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect95] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect96] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect97] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect98] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect99] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect100] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect101] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect102] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect103] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect104] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect105] FAILED [ 13%] tests/test_build_html.py::test_html_output[objects.html-expect106] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect107] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect108] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect109] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect110] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect111] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect112] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect113] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect114] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect115] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect116] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect117] FAILED [ 14%] tests/test_build_html.py::test_html_output[objects.html-expect118] FAILED [ 14%] tests/test_build_html.py::test_html_output[contents.html-expect119] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect120] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect121] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect122] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect123] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect124] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect125] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect126] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect127] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect128] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect129] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect130] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect131] FAILED [ 15%] tests/test_build_html.py::test_html_output[contents.html-expect132] FAILED [ 16%] tests/test_build_html.py::test_html_output[contents.html-expect133] FAILED [ 16%] tests/test_build_html.py::test_html_output[contents.html-expect134] FAILED [ 16%] tests/test_build_html.py::test_html_output[contents.html-expect135] FAILED [ 16%] tests/test_build_html.py::test_html_output[images.html-expect136] FAILED [ 16%] tests/test_build_html.py::test_html_output[images.html-expect137] FAILED [ 16%] tests/test_build_html.py::test_html_output[images.html-expect138] FAILED [ 16%] tests/test_build_html.py::test_html_output[images.html-expect139] FAILED [ 16%] tests/test_build_html.py::test_html_output[images.html-expect140] FAILED [ 16%] tests/test_build_html.py::test_html_output[otherext.html-expect141] FAILED [ 16%] tests/test_build_html.py::test_html_output[otherext.html-expect142] FAILED [ 16%] tests/test_build_html.py::test_html_output[footnote.html-expect143] FAILED [ 16%] tests/test_build_html.py::test_html_output[footnote.html-expect144] FAILED [ 16%] tests/test_build_html.py::test_html_output[footnote.html-expect145] FAILED [ 16%] tests/test_build_html.py::test_html_output[footnote.html-expect146] FAILED [ 17%] tests/test_build_html.py::test_html_output[footnote.html-expect147] FAILED [ 17%] tests/test_build_html.py::test_html_output[footnote.html-expect148] FAILED [ 17%] tests/test_build_html.py::test_html_output[footnote.html-expect149] FAILED [ 17%] tests/test_build_html.py::test_html_output[footnote.html-expect150] FAILED [ 17%] tests/test_build_html.py::test_html_output[footnote.html-expect151] FAILED [ 17%] tests/test_build_html.py::test_html_output[footnote.html-expect152] FAILED [ 17%] tests/test_build_html.py::test_html_output[footnote.html-expect153] FAILED [ 17%] tests/test_build_html.py::test_html_output[footnote.html-expect154] FAILED [ 17%] tests/test_build_html.py::test_html_output[footnote.html-expect155] FAILED [ 17%] tests/test_build_html.py::test_html_output[footnote.html-expect156] FAILED [ 17%] tests/test_build_html.py::test_html_output[footnote.html-expect157] FAILED [ 17%] tests/test_build_html.py::test_html_output[bom.html-expect158] FAILED [ 17%] tests/test_build_html.py::test_html_output[subdir/includes.html-expect159] FAILED [ 18%] tests/test_build_html.py::test_html_output[subdir/includes.html-expect160] FAILED [ 18%] tests/test_build_html.py::test_html_output[subdir/includes.html-expect161] FAILED [ 18%] tests/test_build_html.py::test_html_output[subdir/includes.html-expect162] FAILED [ 18%] tests/test_build_html.py::test_html_output[subdir/includes.html-expect163] FAILED [ 18%] tests/test_build_html.py::test_html_output[subdir/images.html-expect164] FAILED [ 18%] tests/test_build_html.py::test_html_output[subdir/images.html-expect165] FAILED [ 18%] tests/test_build_html.py::test_html_output[extensions.html-expect166] FAILED [ 18%] tests/test_build_html.py::test_html_output[extensions.html-expect167] FAILED [ 18%] tests/test_build_html.py::test_html_output[extensions.html-expect168] FAILED [ 18%] tests/test_build_html.py::test_html_output[genindex.html-expect169] FAILED [ 18%] tests/test_build_html.py::test_html_output[genindex.html-expect170] FAILED [ 18%] tests/test_build_html.py::test_html_output[genindex.html-expect171] FAILED [ 18%] tests/test_build_html.py::test_html_output[genindex.html-expect172] FAILED [ 18%] tests/test_build_html.py::test_html_output[genindex.html-expect173] FAILED [ 19%] tests/test_build_html.py::test_html_download FAILED [ 19%] tests/test_build_html.py::test_html_translator FAILED [ 19%] tests/test_build_html.py::test_tocdepth[baz.html-expect0] FAILED [ 19%] tests/test_build_html.py::test_tocdepth[index.html-expect1] FAILED [ 19%] tests/test_build_html.py::test_tocdepth[index.html-expect2] FAILED [ 19%] tests/test_build_html.py::test_tocdepth[index.html-expect3] FAILED [ 19%] tests/test_build_html.py::test_tocdepth[index.html-expect4] FAILED [ 19%] tests/test_build_html.py::test_tocdepth[bar.html-expect5] FAILED [ 19%] tests/test_build_html.py::test_tocdepth[bar.html-expect6] FAILED [ 19%] tests/test_build_html.py::test_tocdepth[bar.html-expect7] FAILED [ 19%] tests/test_build_html.py::test_tocdepth[bar.html-expect8] FAILED [ 19%] tests/test_build_html.py::test_tocdepth[bar.html-expect9] FAILED [ 19%] tests/test_build_html.py::test_tocdepth[bar.html-expect10] FAILED [ 20%] tests/test_build_html.py::test_tocdepth[bar.html-expect11] FAILED [ 20%] tests/test_build_html.py::test_tocdepth[bar.html-expect12] FAILED [ 20%] tests/test_build_html.py::test_tocdepth[foo.html-expect13] FAILED [ 20%] tests/test_build_html.py::test_tocdepth[foo.html-expect14] FAILED [ 20%] tests/test_build_html.py::test_tocdepth[foo.html-expect15] FAILED [ 20%] tests/test_build_html.py::test_tocdepth[foo.html-expect16] FAILED [ 20%] tests/test_build_html.py::test_tocdepth[foo.html-expect17] FAILED [ 20%] tests/test_build_html.py::test_tocdepth[foo.html-expect18] FAILED [ 20%] tests/test_build_html.py::test_tocdepth[foo.html-expect19] FAILED [ 20%] tests/test_build_html.py::test_tocdepth[foo.html-expect20] FAILED [ 20%] tests/test_build_html.py::test_tocdepth[foo.html-expect21] FAILED [ 20%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect0] FAILED [ 20%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect1] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect2] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect3] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect4] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect5] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect6] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect7] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect8] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect9] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect10] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect11] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect12] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect13] FAILED [ 21%] tests/test_build_html.py::test_tocdepth_singlehtml[index.html-expect14] FAILED [ 21%] tests/test_build_html.py::test_numfig_disabled_warn FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[baz.html-expect0] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[baz.html-expect1] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[baz.html-expect2] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[index.html-expect3] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[index.html-expect4] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[index.html-expect5] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[index.html-expect6] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[index.html-expect7] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[index.html-expect8] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[index.html-expect9] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[index.html-expect10] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[index.html-expect11] FAILED [ 22%] tests/test_build_html.py::test_numfig_disabled[index.html-expect12] FAILED [ 23%] tests/test_build_html.py::test_numfig_disabled[index.html-expect13] FAILED [ 23%] tests/test_build_html.py::test_numfig_disabled[index.html-expect14] FAILED [ 23%] tests/test_build_html.py::test_numfig_disabled[index.html-expect15] FAILED [ 23%] tests/test_build_html.py::test_numfig_disabled[bar.html-expect16] FAILED [ 23%] tests/test_build_html.py::test_numfig_disabled[bar.html-expect17] FAILED [ 23%] tests/test_build_html.py::test_numfig_disabled[bar.html-expect18] FAILED [ 23%] tests/test_build_html.py::test_numfig_disabled[foo.html-expect19] FAILED [ 23%] tests/test_build_html.py::test_numfig_disabled[foo.html-expect20] FAILED [ 23%] tests/test_build_html.py::test_numfig_disabled[foo.html-expect21] FAILED [ 23%] tests/test_build_html.py::test_numfig_without_numbered_toctree_warn FAILED [ 23%] tests/test_build_html.py::test_numfig_without_numbered_toctree[baz.html-expect0] FAILED [ 23%] tests/test_build_html.py::test_numfig_without_numbered_toctree[baz.html-expect1] FAILED [ 23%] tests/test_build_html.py::test_numfig_without_numbered_toctree[baz.html-expect2] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect3] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect4] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect5] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect6] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect7] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect8] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect9] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect10] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect11] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect12] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect13] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect14] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect15] FAILED [ 24%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect16] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect17] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[index.html-expect18] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[bar.html-expect19] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[bar.html-expect20] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[bar.html-expect21] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[bar.html-expect22] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[bar.html-expect23] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[bar.html-expect24] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[bar.html-expect25] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[bar.html-expect26] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[bar.html-expect27] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect28] FAILED [ 25%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect29] FAILED [ 26%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect30] FAILED [ 26%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect31] FAILED [ 26%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect32] FAILED [ 26%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect33] FAILED [ 26%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect34] FAILED [ 26%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect35] FAILED [ 26%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect36] FAILED [ 26%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect37] FAILED [ 26%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect38] FAILED [ 26%] tests/test_build_html.py::test_numfig_without_numbered_toctree[foo.html-expect39] FAILED [ 26%] tests/test_build_html.py::test_numfig_with_numbered_toctree_warn FAILED [ 26%] tests/test_build_html.py::test_numfig_with_numbered_toctree[baz.html-expect0] FAILED [ 26%] tests/test_build_html.py::test_numfig_with_numbered_toctree[baz.html-expect1] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[baz.html-expect2] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect3] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect4] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect5] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect6] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect7] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect8] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect9] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect10] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect11] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect12] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect13] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect14] FAILED [ 27%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect15] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect16] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect17] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[index.html-expect18] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[bar.html-expect19] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[bar.html-expect20] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[bar.html-expect21] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[bar.html-expect22] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[bar.html-expect23] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[bar.html-expect24] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[bar.html-expect25] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[bar.html-expect26] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[bar.html-expect27] FAILED [ 28%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect28] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect29] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect30] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect31] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect32] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect33] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect34] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect35] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect36] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect37] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect38] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_numbered_toctree[foo.html-expect39] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_prefix_warn FAILED [ 29%] tests/test_build_html.py::test_numfig_with_prefix[baz.html-expect0] FAILED [ 29%] tests/test_build_html.py::test_numfig_with_prefix[baz.html-expect1] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[baz.html-expect2] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect3] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect4] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect5] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect6] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect7] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect8] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect9] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect10] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect11] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect12] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect13] FAILED [ 30%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect14] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect15] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect16] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect17] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[index.html-expect18] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[bar.html-expect19] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[bar.html-expect20] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[bar.html-expect21] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[bar.html-expect22] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[bar.html-expect23] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[bar.html-expect24] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[bar.html-expect25] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[bar.html-expect26] FAILED [ 31%] tests/test_build_html.py::test_numfig_with_prefix[bar.html-expect27] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect28] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect29] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect30] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect31] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect32] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect33] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect34] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect35] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect36] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect37] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect38] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_prefix[foo.html-expect39] FAILED [ 32%] tests/test_build_html.py::test_numfig_with_secnum_depth_warn FAILED [ 32%] tests/test_build_html.py::test_numfig_with_secnum_depth[baz.html-expect0] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[baz.html-expect1] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[baz.html-expect2] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect3] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect4] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect5] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect6] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect7] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect8] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect9] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect10] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect11] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect12] FAILED [ 33%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect13] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect14] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect15] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect16] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect17] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[index.html-expect18] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[bar.html-expect19] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[bar.html-expect20] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[bar.html-expect21] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[bar.html-expect22] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[bar.html-expect23] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[bar.html-expect24] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[bar.html-expect25] FAILED [ 34%] tests/test_build_html.py::test_numfig_with_secnum_depth[bar.html-expect26] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[bar.html-expect27] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect28] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect29] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect30] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect31] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect32] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect33] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect34] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect35] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect36] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect37] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect38] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_secnum_depth[foo.html-expect39] FAILED [ 35%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect0] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect1] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect2] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect3] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect4] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect5] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect6] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect7] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect8] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect9] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect10] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect11] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect12] FAILED [ 36%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect13] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect14] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect15] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect16] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect17] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect18] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect19] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect20] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect21] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect22] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect23] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect24] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect25] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect26] FAILED [ 37%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect27] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect28] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect29] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect30] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect31] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect32] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect33] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect34] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect35] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect36] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect37] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect38] FAILED [ 38%] tests/test_build_html.py::test_numfig_with_singlehtml[index.html-expect39] FAILED [ 38%] tests/test_build_html.py::test_enumerable_node[index.html-expect0] FAILED [ 39%] tests/test_build_html.py::test_enumerable_node[index.html-expect1] FAILED [ 39%] tests/test_build_html.py::test_enumerable_node[index.html-expect2] FAILED [ 39%] tests/test_build_html.py::test_enumerable_node[index.html-expect3] FAILED [ 39%] tests/test_build_html.py::test_enumerable_node[index.html-expect4] FAILED [ 39%] tests/test_build_html.py::test_enumerable_node[index.html-expect5] FAILED [ 39%] tests/test_build_html.py::test_enumerable_node[index.html-expect6] FAILED [ 39%] tests/test_build_html.py::test_enumerable_node[index.html-expect7] FAILED [ 39%] tests/test_build_html.py::test_enumerable_node[index.html-expect8] FAILED [ 39%] tests/test_build_html.py::test_enumerable_node[index.html-expect9] FAILED [ 39%] tests/test_build_html.py::test_html_assets FAILED [ 39%] tests/test_build_html.py::test_html_copy_source FAILED [ 39%] tests/test_build_html.py::test_html_sourcelink_suffix FAILED [ 39%] tests/test_build_html.py::test_html_sourcelink_suffix_same FAILED [ 40%] tests/test_build_html.py::test_html_sourcelink_suffix_empty FAILED [ 40%] tests/test_build_html.py::test_html_entity FAILED [ 40%] tests/test_build_html.py::test_html_inventory FAILED [ 40%] tests/test_build_html.py::test_html_raw_directive FAILED [ 40%] tests/test_build_html.py::test_alternate_stylesheets[index.html-expect0] FAILED [ 40%] tests/test_build_html.py::test_alternate_stylesheets[index.html-expect1] FAILED [ 40%] tests/test_build_html.py::test_alternate_stylesheets[index.html-expect2] FAILED [ 40%] tests/test_build_html.py::test_alternate_stylesheets[index.html-expect3] FAILED [ 40%] tests/test_build_html.py::test_alternate_stylesheets[index.html-expect4] FAILED [ 40%] tests/test_build_html.py::test_alternate_stylesheets[index.html-expect5] FAILED [ 40%] tests/test_build_html.py::test_alternate_stylesheets[index.html-expect6] FAILED [ 40%] tests/test_build_html.py::test_alternate_stylesheets[index.html-expect7] FAILED [ 40%] tests/test_build_html.py::test_html_style FAILED [ 40%] tests/test_build_html.py::test_html_remote_images FAILED [ 41%] tests/test_build_html.py::test_html_sidebar FAILED [ 41%] tests/test_build_html.py::test_html_manpage[index.html-expect0] FAILED [ 41%] tests/test_build_html.py::test_html_manpage[index.html-expect1] FAILED [ 41%] tests/test_build_html.py::test_html_manpage[index.html-expect2] FAILED [ 41%] tests/test_build_html.py::test_html_baseurl FAILED [ 41%] tests/test_build_html.py::test_html_baseurl_and_html_file_suffix FAILED [ 41%] tests/test_build_html.py::test_default_html_math_renderer PASSED [ 41%] tests/test_build_html.py::test_html_math_renderer_is_mathjax PASSED [ 41%] tests/test_build_html.py::test_html_math_renderer_is_imgmath PASSED [ 41%] tests/test_build_html.py::test_html_math_renderer_is_duplicated PASSED [ 41%] tests/test_build_html.py::test_html_math_renderer_is_duplicated2 PASSED [ 41%] tests/test_build_html.py::test_html_math_renderer_is_chosen PASSED [ 41%] tests/test_build_html.py::test_html_math_renderer_is_mismatched PASSED [ 42%] tests/test_build_html.py::test_html_pygments_style_default PASSED [ 42%] tests/test_build_html.py::test_html_pygments_style_manually PASSED [ 42%] tests/test_build_html.py::test_html_pygments_for_classic_theme PASSED [ 42%] tests/test_build_html5.py::test_html5_output[autodoc.html-expect0] FAILED [ 42%] tests/test_build_html5.py::test_html5_output[autodoc.html-expect1] FAILED [ 42%] tests/test_build_html5.py::test_html5_output[autodoc.html-expect2] FAILED [ 42%] tests/test_build_html5.py::test_html5_output[extapi.html-expect3] FAILED [ 42%] tests/test_build_html5.py::test_html5_output[markup.html-expect4] FAILED [ 42%] tests/test_build_html5.py::test_html5_output[markup.html-expect5] FAILED [ 42%] tests/test_build_html5.py::test_html5_output[markup.html-expect6] FAILED [ 42%] tests/test_build_html5.py::test_html5_output[markup.html-expect7] FAILED [ 42%] tests/test_build_html5.py::test_html5_output[markup.html-expect8] FAILED [ 42%] tests/test_build_html5.py::test_html5_output[markup.html-expect9] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect10] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect11] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect12] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect13] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect14] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect15] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect16] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect17] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect18] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect19] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect20] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect21] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect22] FAILED [ 43%] tests/test_build_html5.py::test_html5_output[markup.html-expect23] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect24] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect25] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect26] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect27] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect28] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect29] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect30] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect31] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect32] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect33] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect34] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect35] FAILED [ 44%] tests/test_build_html5.py::test_html5_output[markup.html-expect36] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect37] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect38] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect39] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect40] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect41] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect42] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect43] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect44] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect45] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect46] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect47] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect48] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect49] FAILED [ 45%] tests/test_build_html5.py::test_html5_output[markup.html-expect50] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[markup.html-expect51] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[markup.html-expect52] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[markup.html-expect53] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[includes.html-expect54] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[includes.html-expect55] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[includes.html-expect56] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[includes.html-expect57] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[includes.html-expect58] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[includes.html-expect59] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[includes.html-expect60] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[includes.html-expect61] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[includes.html-expect62] FAILED [ 46%] tests/test_build_html5.py::test_html5_output[includes.html-expect63] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[includes.html-expect64] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[includes.html-expect65] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[includes.html-expect66] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[objects.html-expect67] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[objects.html-expect68] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[objects.html-expect69] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[objects.html-expect70] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[objects.html-expect71] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[objects.html-expect72] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[objects.html-expect73] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[objects.html-expect74] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[objects.html-expect75] FAILED [ 47%] tests/test_build_html5.py::test_html5_output[objects.html-expect76] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect77] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect78] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect79] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect80] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect81] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect82] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect83] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect84] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect85] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect86] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect87] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect88] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect89] FAILED [ 48%] tests/test_build_html5.py::test_html5_output[objects.html-expect90] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect91] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect92] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect93] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect94] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect95] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect96] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect97] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect98] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect99] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect100] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect101] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect102] FAILED [ 49%] tests/test_build_html5.py::test_html5_output[objects.html-expect103] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[objects.html-expect104] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[objects.html-expect105] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[objects.html-expect106] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[objects.html-expect107] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[objects.html-expect108] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[objects.html-expect109] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[objects.html-expect110] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[objects.html-expect111] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[objects.html-expect112] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[contents.html-expect113] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[contents.html-expect114] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[contents.html-expect115] FAILED [ 50%] tests/test_build_html5.py::test_html5_output[contents.html-expect116] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect117] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect118] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect119] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect120] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect121] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect122] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect123] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect124] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect125] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect126] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect127] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect128] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[contents.html-expect129] FAILED [ 51%] tests/test_build_html5.py::test_html5_output[images.html-expect130] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[images.html-expect131] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[images.html-expect132] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[images.html-expect133] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[images.html-expect134] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[otherext.html-expect135] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[otherext.html-expect136] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[footnote.html-expect137] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[footnote.html-expect138] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[footnote.html-expect139] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[footnote.html-expect140] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[footnote.html-expect141] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[footnote.html-expect142] FAILED [ 52%] tests/test_build_html5.py::test_html5_output[footnote.html-expect143] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[footnote.html-expect144] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[footnote.html-expect145] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[footnote.html-expect146] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[footnote.html-expect147] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[footnote.html-expect148] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[footnote.html-expect149] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[footnote.html-expect150] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[footnote.html-expect151] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[bom.html-expect152] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[subdir/includes.html-expect153] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[subdir/includes.html-expect154] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[subdir/includes.html-expect155] FAILED [ 53%] tests/test_build_html5.py::test_html5_output[subdir/includes.html-expect156] FAILED [ 54%] tests/test_build_html5.py::test_html5_output[subdir/includes.html-expect157] FAILED [ 54%] tests/test_build_html5.py::test_html5_output[subdir/images.html-expect158] FAILED [ 54%] tests/test_build_html5.py::test_html5_output[subdir/images.html-expect159] FAILED [ 54%] tests/test_build_html5.py::test_html5_output[extensions.html-expect160] FAILED [ 54%] tests/test_build_html5.py::test_html5_output[extensions.html-expect161] FAILED [ 54%] tests/test_build_html5.py::test_html5_output[extensions.html-expect162] FAILED [ 54%] tests/test_build_html5.py::test_html5_output[genindex.html-expect163] FAILED [ 54%] tests/test_build_html5.py::test_html5_output[genindex.html-expect164] FAILED [ 54%] tests/test_build_html5.py::test_html5_output[genindex.html-expect165] FAILED [ 54%] tests/test_build_html5.py::test_html5_output[genindex.html-expect166] FAILED [ 54%] tests/test_build_html5.py::test_html5_output[genindex.html-expect167] FAILED [ 54%] tests/test_build_html5.py::test_html_download FAILED [ 54%] tests/test_build_html5.py::test_html_download_role FAILED [ 54%] tests/test_build_htmlhelp.py::test_chm FAILED [ 55%] tests/test_build_htmlhelp.py::test_chm_htmlescape PASSED [ 55%] tests/test_build_latex.py::test_build_latex_doc[pdflatex-howto] FAILED [ 55%] tests/test_build_latex.py::test_build_latex_doc[pdflatex-manual] FAILED [ 55%] tests/test_build_latex.py::test_build_latex_doc[lualatex-howto] FAILED [ 55%] tests/test_build_latex.py::test_build_latex_doc[lualatex-manual] FAILED [ 55%] tests/test_build_latex.py::test_build_latex_doc[xelatex-howto] FAILED [ 55%] tests/test_build_latex.py::test_build_latex_doc[xelatex-manual] FAILED [ 55%] tests/test_build_latex.py::test_writer FAILED [ 55%] tests/test_build_latex.py::test_latex_warnings FAILED [ 55%] tests/test_build_latex.py::test_latex_basic FAILED [ 55%] tests/test_build_latex.py::test_latex_title_after_admonitions FAILED [ 55%] tests/test_build_latex.py::test_latex_release FAILED [ 55%] tests/test_build_latex.py::test_numref FAILED [ 56%] tests/test_build_latex.py::test_numref_with_prefix1 FAILED [ 56%] tests/test_build_latex.py::test_numref_with_prefix2 FAILED [ 56%] tests/test_build_latex.py::test_numref_with_language_ja FAILED [ 56%] tests/test_build_latex.py::test_latex_obey_numfig_is_false FAILED [ 56%] tests/test_build_latex.py::test_latex_obey_numfig_secnum_depth_is_zero FAILED [ 56%] tests/test_build_latex.py::test_latex_obey_numfig_secnum_depth_is_two FAILED [ 56%] tests/test_build_latex.py::test_latex_obey_numfig_but_math_numfig_false FAILED [ 56%] tests/test_build_latex.py::test_latex_add_latex_package FAILED [ 56%] tests/test_build_latex.py::test_babel_with_no_language_settings FAILED [ 56%] tests/test_build_latex.py::test_babel_with_language_de FAILED [ 56%] tests/test_build_latex.py::test_babel_with_language_ru FAILED [ 56%] tests/test_build_latex.py::test_babel_with_language_tr FAILED [ 56%] tests/test_build_latex.py::test_babel_with_language_ja FAILED [ 56%] tests/test_build_latex.py::test_babel_with_unknown_language FAILED [ 57%] tests/test_build_latex.py::test_polyglossia_with_language_de FAILED [ 57%] tests/test_build_latex.py::test_polyglossia_with_language_de_1901 FAILED [ 57%] tests/test_build_latex.py::test_footnote FAILED [ 57%] tests/test_build_latex.py::test_reference_in_caption_and_codeblock_in_footnote FAILED [ 57%] tests/test_build_latex.py::test_latex_show_urls_is_inline FAILED [ 57%] tests/test_build_latex.py::test_latex_show_urls_is_footnote FAILED [ 57%] tests/test_build_latex.py::test_latex_show_urls_is_no FAILED [ 57%] tests/test_build_latex.py::test_latex_show_urls_footnote_and_substitutions FAILED [ 57%] tests/test_build_latex.py::test_image_in_section FAILED [ 57%] tests/test_build_latex.py::test_latex_logo_if_not_found FAILED [ 57%] tests/test_build_latex.py::test_toctree_maxdepth_manual FAILED [ 57%] tests/test_build_latex.py::test_toctree_maxdepth_howto FAILED [ 57%] tests/test_build_latex.py::test_toctree_not_found FAILED [ 58%] tests/test_build_latex.py::test_toctree_without_maxdepth FAILED [ 58%] tests/test_build_latex.py::test_toctree_with_deeper_maxdepth FAILED [ 58%] tests/test_build_latex.py::test_latex_toplevel_sectioning_is_None FAILED [ 58%] tests/test_build_latex.py::test_latex_toplevel_sectioning_is_part FAILED [ 58%] tests/test_build_latex.py::test_latex_toplevel_sectioning_is_part_with_howto FAILED [ 58%] tests/test_build_latex.py::test_latex_toplevel_sectioning_is_chapter FAILED [ 58%] tests/test_build_latex.py::test_latex_toplevel_sectioning_is_chapter_with_howto FAILED [ 58%] tests/test_build_latex.py::test_latex_toplevel_sectioning_is_section FAILED [ 58%] tests/test_build_latex.py::test_maxlistdepth_at_ten FAILED [ 58%] tests/test_build_latex.py::test_latex_table_tabulars FAILED [ 58%] tests/test_build_latex.py::test_latex_table_longtable FAILED [ 58%] tests/test_build_latex.py::test_latex_table_complex_tables FAILED [ 58%] tests/test_build_latex.py::test_latex_table_custom_template_caseA FAILED [ 59%] tests/test_build_latex.py::test_latex_table_custom_template_caseB FAILED [ 59%] tests/test_build_latex.py::test_latex_table_custom_template_caseC FAILED [ 59%] tests/test_build_latex.py::test_latex_raw_directive FAILED [ 59%] tests/test_build_latex.py::test_latex_images SKIPPED [ 59%] tests/test_build_latex.py::test_latex_index FAILED [ 59%] tests/test_build_latex.py::test_latex_equations FAILED [ 59%] tests/test_build_latex.py::test_latex_image_in_parsed_literal FAILED [ 59%] tests/test_build_latex.py::test_latex_nested_enumerated_list FAILED [ 59%] tests/test_build_latex.py::test_latex_thebibliography FAILED [ 59%] tests/test_build_latex.py::test_latex_glossary FAILED [ 59%] tests/test_build_latex.py::test_latex_labels FAILED [ 59%] tests/test_build_latex.py::test_index_on_title FAILED [ 59%] tests/test_build_linkcheck.py::test_defaults SKIPPED [ 59%] tests/test_build_linkcheck.py::test_anchors_ignored SKIPPED [ 60%] tests/test_build_manpage.py::test_all FAILED [ 60%] tests/test_build_manpage.py::test_captioned_code_block FAILED [ 60%] tests/test_build_qthelp.py::test_qthelp_basic FAILED [ 60%] tests/test_build_qthelp.py::test_qthelp_escaped FAILED [ 60%] tests/test_build_qthelp.py::test_qthelp_namespace FAILED [ 60%] tests/test_build_qthelp.py::test_qthelp_title FAILED [ 60%] tests/test_build_texinfo.py::test_texinfo_warnings FAILED [ 60%] tests/test_build_texinfo.py::test_texinfo FAILED [ 60%] tests/test_build_texinfo.py::test_texinfo_rubric FAILED [ 60%] tests/test_build_texinfo.py::test_texinfo_citation FAILED [ 60%] tests/test_build_texinfo.py::test_texinfo_escape_id PASSED [ 60%] tests/test_build_text.py::test_maxwitdh_with_prefix FAILED [ 60%] tests/test_build_text.py::test_lineblock FAILED [ 61%] tests/test_build_text.py::test_nonascii_title_line FAILED [ 61%] tests/test_build_text.py::test_nonascii_table FAILED [ 61%] tests/test_build_text.py::test_nonascii_maxwidth FAILED [ 61%] tests/test_build_text.py::test_table_with_empty_cell FAILED [ 61%] tests/test_build_text.py::test_list_items_in_admonition FAILED [ 61%] tests/test_build_text.py::test_secnums FAILED [ 61%] tests/test_builder.py::test_incremental_reading FAILED [ 61%] tests/test_builder.py::test_env_read_docs PASSED [ 61%] tests/test_catalogs.py::test_compile_all_catalogs ERROR [ 61%] tests/test_catalogs.py::test_compile_specific_catalogs ERROR [ 61%] tests/test_catalogs.py::test_compile_update_catalogs ERROR [ 61%] tests/test_config.py::test_core_config PASSED [ 61%] tests/test_config.py::test_extension_values PASSED [ 62%] tests/test_config.py::test_overrides PASSED [ 62%] tests/test_config.py::test_errors_warnings FAILED [ 62%] tests/test_config.py::test_errors_if_setup_is_not_callable FAILED [ 62%] tests/test_config.py::test_needs_sphinx ERROR [ 62%] tests/test_config.py::test_config_eol PASSED [ 62%] tests/test_config.py::test_builtin_conf PASSED [ 62%] tests/test_config.py::test_check_types[value1-string-None-123-True] PASSED [ 62%] tests/test_config.py::test_check_types[value2--None-123-True] PASSED [ 62%] tests/test_config.py::test_check_types[value3--None-actual2-False] PASSED [ 62%] tests/test_config.py::test_check_types[value4-100-None-True-True] PASSED [ 62%] tests/test_config.py::test_check_types[value5-False-None-True-False] PASSED [ 62%] tests/test_config.py::test_check_types[value6-default5-None-actual5-True] PASSED [ 62%] tests/test_config.py::test_check_types[value7-string-annotation6-actual6-False] PASSED [ 62%] tests/test_config.py::test_check_types[value8-default7-None-actual7-False] PASSED [ 63%] tests/test_config.py::test_check_types[value9-None-None-foo-False] PASSED [ 63%] tests/test_config.py::test_check_types[value10-None-None-123-False] PASSED [ 63%] tests/test_config.py::test_check_types[value11-None-annotation10-bar-True] PASSED [ 63%] tests/test_config.py::test_check_types[value12-string-None-bar-False] PASSED [ 63%] tests/test_config.py::test_check_types[value13-None-annotation12-bar-False] PASSED [ 63%] tests/test_config.py::test_check_types[value14-None-annotation13-bar-False] PASSED [ 63%] tests/test_config.py::test_check_types[value15-unicode-None-bar-False] PASSED [ 63%] tests/test_config.py::test_check_types[value16-unicode-None-bar-False] PASSED [ 63%] tests/test_config.py::test_check_enum PASSED [ 63%] tests/test_config.py::test_check_enum_failed PASSED [ 63%] tests/test_config.py::test_check_enum_for_list PASSED [ 63%] tests/test_config.py::test_check_enum_for_list_failed PASSED [ 63%] tests/test_correct_year.py::test_correct_year[expect_date0] FAILED [ 64%] tests/test_correct_year.py::test_correct_year[expect_date1] FAILED [ 64%] tests/test_correct_year.py::test_correct_year[expect_date2] FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader_lineno_start FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader_pyobject1 FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader_pyobject2 FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader_pyobject3 FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader_pyobject_and_lines FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader_lines1 FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader_lines2 FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader_lines_and_lineno_match1 FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader_lines_and_lineno_match2 FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader_lines_and_lineno_match3 FAILED [ 64%] tests/test_directive_code.py::test_LiteralIncludeReader_start_at FAILED [ 65%] tests/test_directive_code.py::test_LiteralIncludeReader_start_after FAILED [ 65%] tests/test_directive_code.py::test_LiteralIncludeReader_start_after_and_lines FAILED [ 65%] tests/test_directive_code.py::test_LiteralIncludeReader_start_at_and_lines FAILED [ 65%] tests/test_directive_code.py::test_LiteralIncludeReader_missing_start_and_end FAILED [ 65%] tests/test_directive_code.py::test_LiteralIncludeReader_prepend FAILED [ 65%] tests/test_directive_code.py::test_LiteralIncludeReader_dedent FAILED [ 65%] tests/test_directive_code.py::test_LiteralIncludeReader_tabwidth FAILED [ 65%] tests/test_directive_code.py::test_LiteralIncludeReader_tabwidth_dedent FAILED [ 65%] tests/test_directive_code.py::test_LiteralIncludeReader_diff FAILED [ 65%] tests/test_directive_code.py::test_code_block FAILED [ 65%] tests/test_directive_code.py::test_code_block_caption_html FAILED [ 65%] tests/test_directive_code.py::test_code_block_caption_latex FAILED [ 65%] tests/test_directive_code.py::test_code_block_namedlink_latex FAILED [ 66%] tests/test_directive_code.py::test_code_block_emphasize_latex FAILED [ 66%] tests/test_directive_code.py::test_literal_include FAILED [ 66%] tests/test_directive_code.py::test_literal_include_block_start_with_comment_or_brank FAILED [ 66%] tests/test_directive_code.py::test_literal_include_linenos FAILED [ 66%] tests/test_directive_code.py::test_literalinclude_file_whole_of_emptyline FAILED [ 66%] tests/test_directive_code.py::test_literalinclude_caption_html FAILED [ 66%] tests/test_directive_code.py::test_literalinclude_caption_latex FAILED [ 66%] tests/test_directive_code.py::test_literalinclude_namedlink_latex FAILED [ 66%] tests/test_directive_code.py::test_literalinclude_classes FAILED [ 66%] tests/test_directive_code.py::test_literalinclude_pydecorators FAILED [ 66%] tests/test_directive_only.py::test_sectioning FAILED [ 66%] tests/test_directive_other.py::test_toctree PASSED [ 66%] tests/test_directive_other.py::test_relative_toctree PASSED [ 67%] tests/test_directive_other.py::test_toctree_urls_and_titles PASSED [ 67%] tests/test_directive_other.py::test_toctree_glob PASSED [ 67%] tests/test_directive_other.py::test_toctree_glob_and_url PASSED [ 67%] tests/test_directive_other.py::test_toctree_twice PASSED [ 67%] tests/test_docutilsconf.py::test_html_with_default_docutilsconf ERROR [ 67%] tests/test_docutilsconf.py::test_html_with_docutilsconf ERROR [ 67%] tests/test_docutilsconf.py::test_html FAILED [ 67%] tests/test_docutilsconf.py::test_latex FAILED [ 67%] tests/test_docutilsconf.py::test_man PASSED [ 67%] tests/test_docutilsconf.py::test_texinfo PASSED [ 67%] tests/test_docutilsconf.py::test_docutils_source_link_with_nonascii_file SKIPPED [ 67%] tests/test_domain_cpp.py::test_fundamental_types PASSED [ 67%] tests/test_domain_cpp.py::test_expressions PASSED [ 67%] tests/test_domain_cpp.py::test_type_definitions PASSED [ 68%] tests/test_domain_cpp.py::test_concept_definitions PASSED [ 68%] tests/test_domain_cpp.py::test_member_definitions PASSED [ 68%] tests/test_domain_cpp.py::test_function_definitions PASSED [ 68%] tests/test_domain_cpp.py::test_operators PASSED [ 68%] tests/test_domain_cpp.py::test_class_definitions PASSED [ 68%] tests/test_domain_cpp.py::test_union_definitions PASSED [ 68%] tests/test_domain_cpp.py::test_enum_definitions PASSED [ 68%] tests/test_domain_cpp.py::test_anon_definitions PASSED [ 68%] tests/test_domain_cpp.py::test_templates PASSED [ 68%] tests/test_domain_cpp.py::test_template_args PASSED [ 68%] tests/test_domain_cpp.py::test_attributes PASSED [ 68%] tests/test_domain_cpp.py::test_build_domain_cpp_misuse_of_roles FAILED [ 68%] tests/test_domain_cpp.py::test_build_domain_cpp_with_add_function_parentheses_is_True FAILED [ 69%] tests/test_domain_cpp.py::test_build_domain_cpp_with_add_function_parentheses_is_False FAILED [ 69%] tests/test_domain_cpp.py::test_xref_consistency FAILED [ 69%] tests/test_domain_js.py::test_domain_js_xrefs PASSED [ 69%] tests/test_domain_js.py::test_domain_js_objects PASSED [ 69%] tests/test_domain_js.py::test_domain_js_find_obj PASSED [ 69%] tests/test_domain_js.py::test_get_full_qualified_name PASSED [ 69%] tests/test_domain_py.py::test_function_signatures PASSED [ 69%] tests/test_domain_py.py::test_domain_py_xrefs PASSED [ 69%] tests/test_domain_py.py::test_domain_py_objects PASSED [ 69%] tests/test_domain_py.py::test_domain_py_find_obj PASSED [ 69%] tests/test_domain_py.py::test_get_full_qualified_name PASSED [ 69%] tests/test_domain_rst.py::test_parse_directive PASSED [ 69%] tests/test_domain_std.py::test_process_doc_handle_figure_caption PASSED [ 70%] tests/test_domain_std.py::test_process_doc_handle_table_title PASSED [ 70%] tests/test_domain_std.py::test_get_full_qualified_name PASSED [ 70%] tests/test_environment.py::test_images PASSED [ 70%] tests/test_environment.py::test_object_inventory PASSED [ 70%] tests/test_environment_indexentries.py::test_create_single_index PASSED [ 70%] tests/test_environment_indexentries.py::test_create_pair_index PASSED [ 70%] tests/test_environment_indexentries.py::test_create_triple_index PASSED [ 70%] tests/test_environment_indexentries.py::test_create_see_index PASSED [ 70%] tests/test_environment_indexentries.py::test_create_seealso_index PASSED [ 70%] tests/test_environment_indexentries.py::test_create_index_by_key PASSED [ 70%] tests/test_environment_toctree.py::test_process_doc FAILED [ 70%] tests/test_environment_toctree.py::test_glob PASSED [ 70%] tests/test_environment_toctree.py::test_get_toc_for FAILED [ 70%] tests/test_environment_toctree.py::test_get_toc_for_only FAILED [ 71%] tests/test_environment_toctree.py::test_get_toc_for_tocdepth FAILED [ 71%] tests/test_environment_toctree.py::test_get_toctree_for FAILED [ 71%] tests/test_environment_toctree.py::test_get_toctree_for_collapse FAILED [ 71%] tests/test_environment_toctree.py::test_get_toctree_for_maxdepth FAILED [ 71%] tests/test_environment_toctree.py::test_get_toctree_for_includehidden FAILED [ 71%] tests/test_errors.py::test_extension_error_repr PASSED [ 71%] tests/test_errors.py::test_extension_error_with_orig_exc_repr PASSED [ 71%] tests/test_ext_apidoc.py::test_simple ERROR [ 71%] tests/test_ext_apidoc.py::test_pep_0420_enabled ERROR [ 71%] tests/test_ext_apidoc.py::test_pep_0420_enabled_separate ERROR [ 71%] tests/test_ext_apidoc.py::test_pep_0420_disabled ERROR [ 71%] tests/test_ext_apidoc.py::test_pep_0420_disabled_top_level_verify ERROR [ 71%] tests/test_ext_apidoc.py::test_trailing_underscore ERROR [ 72%] tests/test_ext_apidoc.py::test_excludes ERROR [ 72%] tests/test_ext_apidoc.py::test_excludes_subpackage_should_be_skipped ERROR [ 72%] tests/test_ext_apidoc.py::test_excludes_module_should_be_skipped ERROR [ 72%] tests/test_ext_apidoc.py::test_excludes_module_should_not_be_skipped ERROR [ 72%] tests/test_ext_apidoc.py::test_multibyte_parameters ERROR [ 72%] tests/test_ext_apidoc.py::test_extension_parsed ERROR [ 72%] tests/test_ext_apidoc.py::test_toc_all_references_should_exist_pep420_enabled ERROR [ 72%] tests/test_ext_apidoc.py::test_toc_all_references_should_exist_pep420_disabled ERROR [ 72%] tests/test_ext_apidoc.py::test_subpackage_in_toc ERROR [ 72%] tests/test_ext_autodoc.py::test_autodoc PASSED [ 72%] tests/test_ext_autodoc_importer.py::test_MockObject PASSED [ 72%] tests/test_ext_autodoc_importer.py::test_abc_MockObject SKIPPED [ 72%] tests/test_ext_autosectionlabel.py::test_autosectionlabel_html FAILED [ 72%] tests/test_ext_autosectionlabel.py::test_autosectionlabel_prefix_document_html FAILED [ 73%] tests/test_ext_autosummary.py::test_mangle_signature PASSED [ 73%] tests/test_ext_autosummary.py::test_extract_summary PASSED [ 73%] tests/test_ext_autosummary.py::test_get_items_summary FAILED [ 73%] tests/test_ext_autosummary.py::test_escaping ERROR [ 73%] tests/test_ext_autosummary.py::test_autosummary_generate ERROR [ 73%] tests/test_ext_autosummary.py::test_autosummary_latex_table_colspec ERROR [ 73%] tests/test_ext_autosummary.py::test_import_by_name PASSED [ 73%] tests/test_ext_coverage.py::test_build FAILED [ 73%] tests/test_ext_doctest.py::test_build ERROR [ 73%] tests/test_ext_doctest.py::test_is_allowed_version PASSED [ 73%] tests/test_ext_doctest.py::test_skipif ERROR [ 73%] tests/test_ext_doctest.py::test_reporting_with_autodoc xfail [ 73%] tests/test_ext_githubpages.py::test_githubpages FAILED [ 74%] tests/test_ext_graphviz.py::test_graphviz_png_html FAILED [ 74%] tests/test_ext_graphviz.py::test_graphviz_svg_html FAILED [ 74%] tests/test_ext_graphviz.py::test_graphviz_latex FAILED [ 74%] tests/test_ext_graphviz.py::test_graphviz_i18n FAILED [ 74%] tests/test_ext_graphviz.py::test_graphviz_parse_mapfile PASSED [ 74%] tests/test_ext_ifconfig.py::test_ifconfig FAILED [ 74%] tests/test_ext_imgconverter.py::test_ext_imgconverter FAILED [ 74%] tests/test_ext_inheritance.py::test_inheritance_diagram FAILED [ 74%] tests/test_ext_inheritance_diagram.py::test_inheritance_diagram_png_html FAILED [ 74%] tests/test_ext_inheritance_diagram.py::test_inheritance_diagram_svg_html FAILED [ 74%] tests/test_ext_inheritance_diagram.py::test_inheritance_diagram_latex FAILED [ 74%] tests/test_ext_inheritance_diagram.py::test_inheritance_diagram_latex_alias FAILED [ 74%] tests/test_ext_inheritance_diagram.py::test_import_classes PASSED [ 75%] tests/test_ext_intersphinx.py::test_fetch_inventory_redirection PASSED [ 75%] tests/test_ext_intersphinx.py::test_missing_reference PASSED [ 75%] tests/test_ext_intersphinx.py::test_missing_reference_pydomain PASSED [ 75%] tests/test_ext_intersphinx.py::test_missing_reference_stddomain PASSED [ 75%] tests/test_ext_intersphinx.py::test_missing_reference_cppdomain FAILED [ 75%] tests/test_ext_intersphinx.py::test_missing_reference_jsdomain PASSED [ 75%] tests/test_ext_intersphinx.py::test_inventory_not_having_version PASSED [ 75%] tests/test_ext_intersphinx.py::test_load_mappings_warnings PASSED [ 75%] tests/test_ext_intersphinx.py::test_load_mappings_fallback PASSED [ 75%] tests/test_ext_intersphinx.py::TestStripBasicAuth::test_auth_stripped PASSED [ 75%] tests/test_ext_intersphinx.py::TestStripBasicAuth::test_having_port PASSED [ 75%] tests/test_ext_intersphinx.py::TestStripBasicAuth::test_no_auth PASSED [ 75%] tests/test_ext_intersphinx.py::test_getsafeurl_authed PASSED [ 75%] tests/test_ext_intersphinx.py::test_getsafeurl_authed_having_port PASSED [ 76%] tests/test_ext_intersphinx.py::test_getsafeurl_unauthed PASSED [ 76%] tests/test_ext_intersphinx.py::test_inspect_main_noargs PASSED [ 76%] tests/test_ext_intersphinx.py::test_inspect_main_file PASSED [ 76%] tests/test_ext_intersphinx.py::test_inspect_main_url PASSED [ 76%] tests/test_ext_math.py::test_jsmath FAILED [ 76%] tests/test_ext_math.py::test_imgmath_png FAILED [ 76%] tests/test_ext_math.py::test_imgmath_svg FAILED [ 76%] tests/test_ext_math.py::test_mathjax_options FAILED [ 76%] tests/test_ext_math.py::test_mathjax_align FAILED [ 76%] tests/test_ext_math.py::test_math_number_all_mathjax FAILED [ 76%] tests/test_ext_math.py::test_math_number_all_latex FAILED [ 76%] tests/test_ext_math.py::test_math_eqref_format_html FAILED [ 76%] tests/test_ext_math.py::test_math_eqref_format_latex FAILED [ 77%] tests/test_ext_math.py::test_mathjax_numfig_html FAILED [ 77%] tests/test_ext_math.py::test_jsmath_numfig_html FAILED [ 77%] tests/test_ext_math.py::test_imgmath_numfig_html FAILED [ 77%] tests/test_ext_math.py::test_math_compat PASSED [ 77%] tests/test_ext_math.py::test_mathjax_config FAILED [ 77%] tests/test_ext_math.py::test_mathjax_is_not_installed_if_no_equations FAILED [ 77%] tests/test_ext_math.py::test_jsmath_is_not_installed_if_no_equations FAILED [ 77%] tests/test_ext_napoleon.py::ProcessDocstringTest::test_modify_in_place PASSED [ 77%] tests/test_ext_napoleon.py::SetupTest::test_add_config_values PASSED [ 77%] tests/test_ext_napoleon.py::SetupTest::test_unknown_app_type PASSED [ 77%] tests/test_ext_napoleon.py::SkipMemberTest::test_class_private_doc PASSED [ 77%] tests/test_ext_napoleon.py::SkipMemberTest::test_class_private_undoc PASSED [ 77%] tests/test_ext_napoleon.py::SkipMemberTest::test_class_special_doc PASSED [ 78%] tests/test_ext_napoleon.py::SkipMemberTest::test_class_special_undoc PASSED [ 78%] tests/test_ext_napoleon.py::SkipMemberTest::test_exception_private_doc PASSED [ 78%] tests/test_ext_napoleon.py::SkipMemberTest::test_exception_private_undoc PASSED [ 78%] tests/test_ext_napoleon.py::SkipMemberTest::test_exception_special_doc PASSED [ 78%] tests/test_ext_napoleon.py::SkipMemberTest::test_exception_special_undoc PASSED [ 78%] tests/test_ext_napoleon.py::SkipMemberTest::test_module_private_doc PASSED [ 78%] tests/test_ext_napoleon.py::SkipMemberTest::test_module_private_undoc PASSED [ 78%] tests/test_ext_napoleon.py::SkipMemberTest::test_module_special_doc PASSED [ 78%] tests/test_ext_napoleon.py::SkipMemberTest::test_module_special_undoc PASSED [ 78%] tests/test_ext_napoleon.py::SkipMemberTest::test_namedtuple PASSED [ 78%] tests/test_ext_napoleon_docstring.py::NamedtupleSubclassTest::test_attributes_docstring PASSED [ 78%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_attributes_with_class_reference PASSED [ 78%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_code_block_in_returns_section PASSED [ 78%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_colon_in_return_type PASSED [ 79%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_custom_generic_sections PASSED [ 79%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_docstrings PASSED [ 79%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_kwargs_in_arguments PASSED [ 79%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_list_in_parameter_description PASSED [ 79%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_parameters_with_class_reference PASSED [ 79%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_raises_types PASSED [ 79%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_section_header_formatting PASSED [ 79%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_sphinx_admonitions PASSED [ 79%] tests/test_ext_napoleon_docstring.py::GoogleDocstringTest::test_xrefs_in_return_type PASSED [ 79%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_colon_in_return_type PASSED [ 79%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_docstrings PASSED [ 79%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_keywords_with_types PASSED [ 79%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_list_in_parameter_description PASSED [ 80%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_parameters_with_class_reference PASSED [ 80%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_parameters_without_class_reference PASSED [ 80%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_raises_types PASSED [ 80%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_section_header_underline_length PASSED [ 80%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_see_also_refs PASSED [ 80%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_sphinx_admonitions PASSED [ 80%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_underscore_in_attribute PASSED [ 80%] tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_xrefs_in_return_type PASSED [ 80%] tests/test_ext_napoleon_iterators.py::PeekIterTest::test_init_with_sentinel PASSED [ 80%] tests/test_ext_napoleon_iterators.py::PeekIterTest::test_iter PASSED [ 80%] tests/test_ext_napoleon_iterators.py::PeekIterTest::test_next_with_multi PASSED [ 80%] tests/test_ext_napoleon_iterators.py::PeekIterTest::test_next_with_none PASSED [ 80%] tests/test_ext_napoleon_iterators.py::PeekIterTest::test_next_with_one PASSED [ 81%] tests/test_ext_napoleon_iterators.py::PeekIterTest::test_next_with_zero PASSED [ 81%] tests/test_ext_napoleon_iterators.py::PeekIterTest::test_peek_with_multi PASSED [ 81%] tests/test_ext_napoleon_iterators.py::PeekIterTest::test_peek_with_none PASSED [ 81%] tests/test_ext_napoleon_iterators.py::PeekIterTest::test_peek_with_one PASSED [ 81%] tests/test_ext_napoleon_iterators.py::PeekIterTest::test_peek_with_zero PASSED [ 81%] tests/test_ext_napoleon_iterators.py::ModifyIterTest::test_init_with_sentinel_args PASSED [ 81%] tests/test_ext_napoleon_iterators.py::ModifyIterTest::test_init_with_sentinel_kwargs PASSED [ 81%] tests/test_ext_napoleon_iterators.py::ModifyIterTest::test_modifier_default PASSED [ 81%] tests/test_ext_napoleon_iterators.py::ModifyIterTest::test_modifier_not_callable PASSED [ 81%] tests/test_ext_napoleon_iterators.py::ModifyIterTest::test_modifier_rstrip PASSED [ 81%] tests/test_ext_napoleon_iterators.py::ModifyIterTest::test_modifier_rstrip_unicode PASSED [ 81%] tests/test_ext_todo.py::test_todo FAILED [ 81%] tests/test_ext_todo.py::test_todo_not_included FAILED [ 81%] tests/test_ext_todo.py::test_todo_valid_link FAILED [ 82%] tests/test_ext_viewcode.py::test_viewcode FAILED [ 82%] tests/test_ext_viewcode.py::test_linkcode FAILED [ 82%] tests/test_ext_viewcode.py::test_local_source_files FAILED [ 82%] tests/test_highlighting.py::test_add_lexer PASSED [ 82%] tests/test_highlighting.py::test_detect_interactive PASSED [ 82%] tests/test_highlighting.py::test_lexer_options PASSED [ 82%] tests/test_highlighting.py::test_set_formatter PASSED [ 82%] tests/test_highlighting.py::test_default_highlight PASSED [ 82%] tests/test_intl.py::test_text_toctree FAILED [ 82%] tests/test_intl.py::test_text_emit_warnings FAILED [ 82%] tests/test_intl.py::test_text_warning_node FAILED [ 82%] tests/test_intl.py::test_text_title_underline FAILED [ 82%] tests/test_intl.py::test_text_subdirs FAILED [ 83%] tests/test_intl.py::test_text_inconsistency_warnings FAILED [ 83%] tests/test_intl.py::test_text_literalblock_warnings FAILED [ 83%] tests/test_intl.py::test_text_definition_terms FAILED [ 83%] tests/test_intl.py::test_text_glossary_term FAILED [ 83%] tests/test_intl.py::test_text_glossary_term_inconsistencies FAILED [ 83%] tests/test_intl.py::test_gettext_section PASSED [ 83%] tests/test_intl.py::test_text_section FAILED [ 83%] tests/test_intl.py::test_text_seealso FAILED [ 83%] tests/test_intl.py::test_text_figure_captions FAILED [ 83%] tests/test_intl.py::test_text_rubric FAILED [ 83%] tests/test_intl.py::test_text_docfields FAILED [ 83%] tests/test_intl.py::test_text_admonitions FAILED [ 83%] tests/test_intl.py::test_gettext_toctree PASSED [ 83%] tests/test_intl.py::test_gettext_table PASSED [ 84%] tests/test_intl.py::test_text_table FAILED [ 84%] tests/test_intl.py::test_gettext_topic PASSED [ 84%] tests/test_intl.py::test_text_topic FAILED [ 84%] tests/test_intl.py::test_gettext_definition_terms PASSED [ 84%] tests/test_intl.py::test_gettext_glossary_terms PASSED [ 84%] tests/test_intl.py::test_gettext_glossary_term_inconsistencies PASSED [ 84%] tests/test_intl.py::test_gettext_literalblock FAILED [ 84%] tests/test_intl.py::test_gettext_buildr_ignores_only_directive PASSED [ 84%] tests/test_intl.py::test_gettext_dont_rebuild_mo PASSED [ 84%] tests/test_intl.py::test_html_meta FAILED [ 84%] tests/test_intl.py::test_html_footnotes FAILED [ 84%] tests/test_intl.py::test_html_undefined_refs FAILED [ 84%] tests/test_intl.py::test_html_index_entries FAILED [ 85%] tests/test_intl.py::test_html_versionchanges FAILED [ 85%] tests/test_intl.py::test_html_docfields FAILED [ 85%] tests/test_intl.py::test_html_template FAILED [ 85%] tests/test_intl.py::test_html_rebuild_mo FAILED [ 85%] tests/test_intl.py::test_xml_footnotes FAILED [ 85%] tests/test_intl.py::test_xml_footnote_backlinks FAILED [ 85%] tests/test_intl.py::test_xml_refs_in_python_domain FAILED [ 85%] tests/test_intl.py::test_xml_keep_external_links FAILED [ 85%] tests/test_intl.py::test_xml_role_xref FAILED [ 85%] tests/test_intl.py::test_xml_warnings FAILED [ 85%] tests/test_intl.py::test_xml_label_targets FAILED [ 85%] tests/test_intl.py::test_additional_targets_should_not_be_translated FAILED [ 85%] tests/test_intl.py::test_additional_targets_should_be_translated FAILED [ 86%] tests/test_intl.py::test_text_references FAILED [ 86%] tests/test_intl.py::test_image_glob_intl PASSED [ 86%] tests/test_intl.py::test_image_glob_intl_using_figure_language_filename PASSED [ 86%] tests/test_io.py::test_SphinxRSTFileInput PASSED [ 86%] tests/test_locale.py::test_init PASSED [ 86%] tests/test_locale.py::test_init_with_unknown_language PASSED [ 86%] tests/test_locale.py::test_add_message_catalog PASSED [ 86%] tests/test_markup.py::test_inline[verify_re-``code sample``-

code   sample

-\\sphinxcode{\\sphinxupquote{code sample}}] PASSED [ 86%] tests/test_markup.py::test_inline[verify_re-:samp:`code sample`-

code   sample

-\\sphinxcode{\\sphinxupquote{code sample}}] PASSED [ 86%] tests/test_markup.py::test_inline[verify-:samp:`a{b}c`-

abc

-\sphinxcode{\sphinxupquote{a\sphinxstyleemphasis{b}c}}] PASSED [ 86%] tests/test_markup.py::test_inline[verify-:menuselection:`a --> b`-

a \u2023 b

-\sphinxmenuselection{a \(\rightarrow\) b}] PASSED [ 86%] tests/test_markup.py::test_inline[verify-:menuselection:`&Foo -&&- &Bar`-

Foo -&- Bar

-\sphinxmenuselection{\sphinxaccelerator{F}oo -\&- \sphinxaccelerator{B}ar}] PASSED [ 86%] tests/test_markup.py::test_inline[verify-:guilabel:`&Foo -&&- &Bar`-

Foo -&- Bar

-\sphinxguilabel{\sphinxaccelerator{F}oo -\&- \sphinxaccelerator{B}ar}] PASSED [ 86%] tests/test_markup.py::test_inline[verify_re-:option:`--with-option`-

--with-option

$-\\sphinxcode{\\sphinxupquote{-{-}with-option}}$] PASSED [ 87%] tests/test_markup.py::test_inline[verify-"John"-

\u201cJohn\u201d

-\u201cJohn\u201d] PASSED [ 87%] tests/test_markup.py::test_inline[verify-``"John"``-

"John"

-\sphinxcode{\sphinxupquote{"John"}}] PASSED [ 87%] tests/test_markup.py::test_inline[verify-:manpage:`mp(1)`-

mp(1)

-\sphinxstyleliteralemphasis{\sphinxupquote{mp(1)}}] PASSED [ 87%] tests/test_markup.py::test_inline[verify-\u0393\\\\\u221e$-None-\(\Gamma\)\textbackslash{}\(\infty\)\$] PASSED [ 87%] tests/test_markup.py::test_inline[verify-::\n\n @\u0393\\\u221e${}-None-\\begin{sphinxVerbatim}[commandchars=\\\\\\{\\}]\n@\\(\\Gamma\\)\\PYGZbs{}\\(\\infty\\)\\PYGZdl{}\\PYGZob{}\\PYGZcb{}\n\\end{sphinxVerbatim}] PASSED [ 87%] tests/test_markup.py::test_inline[verify_re-`test `_-None-\\sphinxhref{http:/example.com/~me/}{test}.*] PASSED [ 87%] tests/test_markup.py::test_rst_prolog PASSED [ 87%] tests/test_markup.py::test_keep_warnings_is_True PASSED [ 87%] tests/test_markup.py::test_keep_warnings_is_False PASSED [ 87%] tests/test_markup.py::test_compact_refonly_bullet_list PASSED [ 87%] tests/test_markup.py::test_default_role1 PASSED [ 87%] tests/test_markup.py::test_default_role2 PASSED [ 87%] tests/test_metadata.py::test_docinfo FAILED [ 88%] tests/test_pycode.py::test_ModuleAnalyzer_for_string PASSED [ 88%] tests/test_pycode.py::test_ModuleAnalyzer_for_file PASSED [ 88%] tests/test_pycode.py::test_ModuleAnalyzer_for_module PASSED [ 88%] tests/test_pycode.py::test_ModuleAnalyzer_for_file_in_egg PASSED [ 88%] tests/test_pycode.py::test_ModuleAnalyzer_for_module_in_egg PASSED [ 88%] tests/test_pycode.py::test_ModuleAnalyzer_find_tags PASSED [ 88%] tests/test_pycode.py::test_ModuleAnalyzer_find_attr_docs PASSED [ 88%] tests/test_pycode_parser.py::test_comment_picker_basic PASSED [ 88%] tests/test_pycode_parser.py::test_comment_picker_location PASSED [ 88%] tests/test_pycode_parser.py::test_annotated_assignment_py36 SKIPPED [ 88%] tests/test_pycode_parser.py::test_complex_assignment PASSED [ 88%] tests/test_pycode_parser.py::test_complex_assignment_py3 SKIPPED [ 88%] tests/test_pycode_parser.py::test_obj_assignment PASSED [ 89%] tests/test_pycode_parser.py::test_container_assignment PASSED [ 89%] tests/test_pycode_parser.py::test_function PASSED [ 89%] tests/test_pycode_parser.py::test_nested_function PASSED [ 89%] tests/test_pycode_parser.py::test_class PASSED [ 89%] tests/test_pycode_parser.py::test_class_uses_non_self PASSED [ 89%] tests/test_pycode_parser.py::test_nested_class PASSED [ 89%] tests/test_pycode_parser.py::test_class_comment PASSED [ 89%] tests/test_pycode_parser.py::test_comment_picker_multiline_string PASSED [ 89%] tests/test_pycode_parser.py::test_decorators PASSED [ 89%] tests/test_pycode_parser.py::test_formfeed_char PASSED [ 89%] tests/test_quickstart.py::test_do_prompt PASSED [ 89%] tests/test_quickstart.py::test_do_prompt_inputstrip PASSED [ 89%] tests/test_quickstart.py::test_do_prompt_with_nonascii PASSED [ 89%] tests/test_quickstart.py::test_quickstart_defaults FAILED [ 90%] tests/test_quickstart.py::test_quickstart_all_answers FAILED [ 90%] tests/test_quickstart.py::test_generated_files_eol FAILED [ 90%] tests/test_quickstart.py::test_quickstart_and_build FAILED [ 90%] tests/test_quickstart.py::test_default_filename FAILED [ 90%] tests/test_quickstart.py::test_extensions FAILED [ 90%] tests/test_roles.py::test_samp PASSED [ 90%] tests/test_search.py::test_objects_are_escaped FAILED [ 90%] tests/test_search.py::test_meta_keys_are_handled_for_language_en FAILED [ 90%] tests/test_search.py::test_meta_keys_are_handled_for_language_de FAILED [ 90%] tests/test_search.py::test_stemmer_does_not_remove_short_words FAILED [ 90%] tests/test_search.py::test_stemmer FAILED [ 90%] tests/test_search.py::test_term_in_heading_and_section FAILED [ 90%] tests/test_search.py::test_term_in_raw_directive FAILED [ 91%] tests/test_search.py::test_IndexBuilder PASSED [ 91%] tests/test_search.py::test_IndexBuilder_lookup PASSED [ 91%] tests/test_search.py::test_search_index_gen_zh FAILED [ 91%] tests/test_setup_command.py::test_build_sphinx FAILED [ 91%] tests/test_setup_command.py::test_build_sphinx_multiple_builders FAILED [ 91%] tests/test_setup_command.py::test_build_sphinx_multiple_invalid_builders PASSED [ 91%] tests/test_setup_command.py::test_build_sphinx_with_nonascii_path ERROR [ 91%] tests/test_setup_command.py::test_build_sphinx_return_nonzero_status FAILED [ 91%] tests/test_setup_command.py::test_build_sphinx_warning_return_zero_status FAILED [ 91%] tests/test_setup_command.py::test_build_sphinx_warning_is_error_return_nonzero_status FAILED [ 91%] tests/test_smartquotes.py::test_basic FAILED [ 91%] tests/test_smartquotes.py::test_text_builder FAILED [ 91%] tests/test_smartquotes.py::test_man_builder FAILED [ 91%] tests/test_smartquotes.py::test_latex_builder FAILED [ 92%] tests/test_smartquotes.py::test_ja_html_builder FAILED [ 92%] tests/test_smartquotes.py::test_smartquotes_disabled FAILED [ 92%] tests/test_smartquotes.py::test_smartquotes_action FAILED [ 92%] tests/test_smartquotes.py::test_smartquotes_excludes_language FAILED [ 92%] tests/test_smartquotes.py::test_smartquotes_excludes_builders FAILED [ 92%] tests/test_templating.py::test_layout_overloading FAILED [ 92%] tests/test_templating.py::test_autosummary_class_template_overloading FAILED [ 92%] tests/test_theming.py::test_theme_api PASSED [ 92%] tests/test_theming.py::test_js_source SKIPPED [ 92%] tests/test_theming.py::test_double_inheriting_theme FAILED [ 92%] tests/test_theming.py::test_nested_zipped_theme FAILED [ 92%] tests/test_theming.py::test_staticfiles FAILED [ 92%] tests/test_theming.py::test_theme_sidebars FAILED [ 93%] tests/test_toctree.py::test_relations FAILED [ 93%] tests/test_toctree.py::test_singlehtml_toctree FAILED [ 93%] tests/test_toctree.py::test_numbered_toctree FAILED [ 93%] tests/test_transforms_post_transforms_code.py::test_trim_doctest_flags_html FAILED [ 93%] tests/test_transforms_post_transforms_code.py::test_trim_doctest_flags_latex FAILED [ 93%] tests/test_util.py::test_encode_uri PASSED [ 93%] tests/test_util.py::test_display_chunk PASSED [ 93%] tests/test_util.py::test_get_module_source PASSED [ 93%] tests/test_util.py::test_status_iterator PASSED [ 93%] tests/test_util.py::test_parselinenos PASSED [ 93%] tests/test_util.py::test_xmlname_check PASSED [ 93%] tests/test_util_docstrings.py::test_prepare_docstring PASSED [ 93%] tests/test_util_docstrings.py::test_prepare_commentdoc PASSED [ 94%] tests/test_util_docutils.py::test_register_node PASSED [ 94%] tests/test_util_docutils.py::test_SphinxFileOutput FAILED [ 94%] tests/test_util_fileutil.py::test_copy_asset_file FAILED [ 94%] tests/test_util_fileutil.py::test_copy_asset FAILED [ 94%] tests/test_util_i18n.py::test_catalog_info_for_file_and_path PASSED [ 94%] tests/test_util_i18n.py::test_catalog_info_for_sub_domain_file_and_path PASSED [ 94%] tests/test_util_i18n.py::test_catalog_outdated FAILED [ 94%] tests/test_util_i18n.py::test_catalog_write_mo FAILED [ 94%] tests/test_util_i18n.py::test_get_catalogs_for_xx FAILED [ 94%] tests/test_util_i18n.py::test_get_catalogs_for_en FAILED [ 94%] tests/test_util_i18n.py::test_get_catalogs_with_non_existent_locale PASSED [ 94%] tests/test_util_i18n.py::test_get_catalogs_with_non_existent_locale_dirs PASSED [ 94%] tests/test_util_i18n.py::test_get_catalogs_for_xx_without_outdated FAILED [ 94%] tests/test_util_i18n.py::test_get_catalogs_from_multiple_locale_dirs FAILED [ 95%] tests/test_util_i18n.py::test_get_catalogs_with_compact FAILED [ 95%] tests/test_util_i18n.py::test_get_catalogs_excluded FAILED [ 95%] tests/test_util_i18n.py::test_format_date PASSED [ 95%] tests/test_util_i18n.py::test_get_filename_for_language PASSED [ 95%] tests/test_util_images.py::test_get_image_size PASSED [ 95%] tests/test_util_images.py::test_guess_mimetype PASSED [ 95%] tests/test_util_images.py::test_get_image_extension PASSED [ 95%] tests/test_util_images.py::test_parse_data_uri PASSED [ 95%] tests/test_util_inspect.py::test_getargspec PASSED [ 95%] tests/test_util_inspect.py::test_getargspec_partial PASSED [ 95%] tests/test_util_inspect.py::test_getargspec_partial2 PASSED [ 95%] tests/test_util_inspect.py::test_getargspec_builtin_type PASSED [ 95%] tests/test_util_inspect.py::test_getargspec_bound_methods PASSED [ 96%] tests/test_util_inspect.py::test_Signature PASSED [ 96%] tests/test_util_inspect.py::test_Signature_partial PASSED [ 96%] tests/test_util_inspect.py::test_Signature_methods PASSED [ 96%] tests/test_util_inspect.py::test_Signature_partialmethod SKIPPED [ 96%] tests/test_util_inspect.py::test_Signature_annotations SKIPPED [ 96%] tests/test_util_inspect.py::test_safe_getattr_with_default PASSED [ 96%] tests/test_util_inspect.py::test_safe_getattr_with_exception PASSED [ 96%] tests/test_util_inspect.py::test_safe_getattr_with_property_exception PASSED [ 96%] tests/test_util_inspect.py::test_safe_getattr_with___dict___override PASSED [ 96%] tests/test_util_inspect.py::test_dictionary_sorting PASSED [ 96%] tests/test_util_inspect.py::test_set_sorting PASSED [ 96%] tests/test_util_inspect.py::test_set_sorting_fallback PASSED [ 96%] tests/test_util_inspect.py::test_dict_customtype PASSED [ 97%] tests/test_util_inspect.py::test_isstaticmethod PASSED [ 97%] tests/test_util_inventory.py::test_read_inventory_v1 PASSED [ 97%] tests/test_util_inventory.py::test_read_inventory_v2 PASSED [ 97%] tests/test_util_inventory.py::test_read_inventory_v2_not_having_version PASSED [ 97%] tests/test_util_jsdump.py::test_jsdump PASSED [ 97%] tests/test_util_logging.py::test_info_and_warning PASSED [ 97%] tests/test_util_logging.py::test_verbosity_filter PASSED [ 97%] tests/test_util_logging.py::test_nonl_info_log PASSED [ 97%] tests/test_util_logging.py::test_is_suppressed_warning PASSED [ 97%] tests/test_util_logging.py::test_suppress_warnings PASSED [ 97%] tests/test_util_logging.py::test_warningiserror PASSED [ 97%] tests/test_util_logging.py::test_info_location PASSED [ 97%] tests/test_util_logging.py::test_warning_location PASSED [ 97%] tests/test_util_logging.py::test_pending_warnings PASSED [ 98%] tests/test_util_logging.py::test_colored_logs PASSED [ 98%] tests/test_util_logging.py::test_logging_in_ParallelTasks PASSED [ 98%] tests/test_util_logging.py::test_output_with_unencodable_char PASSED [ 98%] tests/test_util_logging.py::test_skip_warningiserror PASSED [ 98%] tests/test_util_matching.py::test_compile_matchers PASSED [ 98%] tests/test_util_matching.py::test_Matcher PASSED [ 98%] tests/test_util_nodes.py::test_extract_messages[ .. admonition:: admonition title admonition body -title-1] PASSED [ 98%] tests/test_util_nodes.py::test_extract_messages[ .. figure:: foo.jpg this is title -caption-1] PASSED [ 98%] tests/test_util_nodes.py::test_extract_messages[ .. rubric:: spam -rubric-1] PASSED [ 98%] tests/test_util_nodes.py::test_extract_messages[ | spam | egg -line-2] PASSED [ 98%] tests/test_util_nodes.py::test_extract_messages[ section ======= +----------------+ | | **Title 1** | | | Message 1 | +----------------+ -line-2] PASSED [ 98%] tests/test_util_nodes.py::test_extract_messages[ * | **Title 1** | Message 1 -line-2] PASSED [ 98%] tests/test_util_nodes.py::test_extract_messages_without_rawsource PASSED [ 99%] tests/test_util_nodes.py::test_clean_astext PASSED [ 99%] tests/test_util_rst.py::test_escape PASSED [ 99%] tests/test_versioning.py::test_get_ratio ERROR [ 99%] tests/test_versioning.py::test_add_uids ERROR [ 99%] tests/test_versioning.py::test_picklablility ERROR [ 99%] tests/test_versioning.py::test_modified ERROR [ 99%] tests/test_versioning.py::test_added ERROR [ 99%] tests/test_versioning.py::test_deleted ERROR [ 99%] tests/test_versioning.py::test_deleted_end ERROR [ 99%] tests/test_versioning.py::test_insert ERROR [ 99%] tests/test_versioning.py::test_insert_beginning ERROR [ 99%] tests/test_versioning.py::test_insert_similar ERROR [ 99%] tests/test_writer_latex.py::test_rstdim_to_latexdim PASSED [100%] ==================================== ERRORS ==================================== __________________ ERROR at setup of test_build_all[dirhtml] ___________________ request = > rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture def nonascii_srcdir(request, rootdir, sphinx_test_tempdir): # If supported, build in a non-ASCII source dir test_name = u'\u65e5\u672c\u8a9e' basedir = sphinx_test_tempdir / request.node.originalname # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # so we force a non-unicode path in that case if (sys.platform == "win32" and not (sys.version_info.major >= 3 and sys.version_info.minor >= 2)): return basedir / 'all' try: srcdir = basedir / test_name if not srcdir.exists(): (rootdir / 'test-root').copytree(srcdir) except UnicodeEncodeError: srcdir = basedir / 'all' else: # add a doc with a non-ASCII file name to the source dir (srcdir / (test_name + '.txt')).write_text(dedent(""" nonascii file name page ======================= > """)) tests/test_build.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_build_all/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' nonascii file name page ======================= ', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError _________________ ERROR at setup of test_build_all[singlehtml] _________________ request = > rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture def nonascii_srcdir(request, rootdir, sphinx_test_tempdir): # If supported, build in a non-ASCII source dir test_name = u'\u65e5\u672c\u8a9e' basedir = sphinx_test_tempdir / request.node.originalname # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # so we force a non-unicode path in that case if (sys.platform == "win32" and not (sys.version_info.major >= 3 and sys.version_info.minor >= 2)): return basedir / 'all' try: srcdir = basedir / test_name if not srcdir.exists(): (rootdir / 'test-root').copytree(srcdir) except UnicodeEncodeError: srcdir = basedir / 'all' else: # add a doc with a non-ASCII file name to the source dir (srcdir / (test_name + '.txt')).write_text(dedent(""" nonascii file name page ======================= > """)) tests/test_build.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_build_all/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' nonascii file name page ======================= ', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ___________________ ERROR at setup of test_build_all[pickle] ___________________ request = > rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture def nonascii_srcdir(request, rootdir, sphinx_test_tempdir): # If supported, build in a non-ASCII source dir test_name = u'\u65e5\u672c\u8a9e' basedir = sphinx_test_tempdir / request.node.originalname # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # so we force a non-unicode path in that case if (sys.platform == "win32" and not (sys.version_info.major >= 3 and sys.version_info.minor >= 2)): return basedir / 'all' try: srcdir = basedir / test_name if not srcdir.exists(): (rootdir / 'test-root').copytree(srcdir) except UnicodeEncodeError: srcdir = basedir / 'all' else: # add a doc with a non-ASCII file name to the source dir (srcdir / (test_name + '.txt')).write_text(dedent(""" nonascii file name page ======================= > """)) tests/test_build.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_build_all/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' nonascii file name page ======================= ', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ____________________ ERROR at setup of test_build_all[json] ____________________ request = > rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture def nonascii_srcdir(request, rootdir, sphinx_test_tempdir): # If supported, build in a non-ASCII source dir test_name = u'\u65e5\u672c\u8a9e' basedir = sphinx_test_tempdir / request.node.originalname # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # so we force a non-unicode path in that case if (sys.platform == "win32" and not (sys.version_info.major >= 3 and sys.version_info.minor >= 2)): return basedir / 'all' try: srcdir = basedir / test_name if not srcdir.exists(): (rootdir / 'test-root').copytree(srcdir) except UnicodeEncodeError: srcdir = basedir / 'all' else: # add a doc with a non-ASCII file name to the source dir (srcdir / (test_name + '.txt')).write_text(dedent(""" nonascii file name page ======================= > """)) tests/test_build.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_build_all/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' nonascii file name page ======================= ', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ____________________ ERROR at setup of test_build_all[text] ____________________ request = > rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture def nonascii_srcdir(request, rootdir, sphinx_test_tempdir): # If supported, build in a non-ASCII source dir test_name = u'\u65e5\u672c\u8a9e' basedir = sphinx_test_tempdir / request.node.originalname # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # so we force a non-unicode path in that case if (sys.platform == "win32" and not (sys.version_info.major >= 3 and sys.version_info.minor >= 2)): return basedir / 'all' try: srcdir = basedir / test_name if not srcdir.exists(): (rootdir / 'test-root').copytree(srcdir) except UnicodeEncodeError: srcdir = basedir / 'all' else: # add a doc with a non-ASCII file name to the source dir (srcdir / (test_name + '.txt')).write_text(dedent(""" nonascii file name page ======================= > """)) tests/test_build.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_build_all/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' nonascii file name page ======================= ', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError __________________ ERROR at setup of test_build_all[htmlhelp] __________________ request = > rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture def nonascii_srcdir(request, rootdir, sphinx_test_tempdir): # If supported, build in a non-ASCII source dir test_name = u'\u65e5\u672c\u8a9e' basedir = sphinx_test_tempdir / request.node.originalname # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # so we force a non-unicode path in that case if (sys.platform == "win32" and not (sys.version_info.major >= 3 and sys.version_info.minor >= 2)): return basedir / 'all' try: srcdir = basedir / test_name if not srcdir.exists(): (rootdir / 'test-root').copytree(srcdir) except UnicodeEncodeError: srcdir = basedir / 'all' else: # add a doc with a non-ASCII file name to the source dir (srcdir / (test_name + '.txt')).write_text(dedent(""" nonascii file name page ======================= > """)) tests/test_build.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_build_all/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' nonascii file name page ======================= ', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ___________________ ERROR at setup of test_build_all[qthelp] ___________________ request = > rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture def nonascii_srcdir(request, rootdir, sphinx_test_tempdir): # If supported, build in a non-ASCII source dir test_name = u'\u65e5\u672c\u8a9e' basedir = sphinx_test_tempdir / request.node.originalname # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # so we force a non-unicode path in that case if (sys.platform == "win32" and not (sys.version_info.major >= 3 and sys.version_info.minor >= 2)): return basedir / 'all' try: srcdir = basedir / test_name if not srcdir.exists(): (rootdir / 'test-root').copytree(srcdir) except UnicodeEncodeError: srcdir = basedir / 'all' else: # add a doc with a non-ASCII file name to the source dir (srcdir / (test_name + '.txt')).write_text(dedent(""" nonascii file name page ======================= > """)) tests/test_build.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_build_all/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' nonascii file name page ======================= ', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError _________________ ERROR at setup of test_build_all[applehelp] __________________ request = > rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture def nonascii_srcdir(request, rootdir, sphinx_test_tempdir): # If supported, build in a non-ASCII source dir test_name = u'\u65e5\u672c\u8a9e' basedir = sphinx_test_tempdir / request.node.originalname # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # so we force a non-unicode path in that case if (sys.platform == "win32" and not (sys.version_info.major >= 3 and sys.version_info.minor >= 2)): return basedir / 'all' try: srcdir = basedir / test_name if not srcdir.exists(): (rootdir / 'test-root').copytree(srcdir) except UnicodeEncodeError: srcdir = basedir / 'all' else: # add a doc with a non-ASCII file name to the source dir (srcdir / (test_name + '.txt')).write_text(dedent(""" nonascii file name page ======================= > """)) tests/test_build.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_build_all/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' nonascii file name page ======================= ', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ____________________ ERROR at setup of test_build_all[xml] _____________________ request = > rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture def nonascii_srcdir(request, rootdir, sphinx_test_tempdir): # If supported, build in a non-ASCII source dir test_name = u'\u65e5\u672c\u8a9e' basedir = sphinx_test_tempdir / request.node.originalname # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # so we force a non-unicode path in that case if (sys.platform == "win32" and not (sys.version_info.major >= 3 and sys.version_info.minor >= 2)): return basedir / 'all' try: srcdir = basedir / test_name if not srcdir.exists(): (rootdir / 'test-root').copytree(srcdir) except UnicodeEncodeError: srcdir = basedir / 'all' else: # add a doc with a non-ASCII file name to the source dir (srcdir / (test_name + '.txt')).write_text(dedent(""" nonascii file name page ======================= > """)) tests/test_build.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_build_all/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' nonascii file name page ======================= ', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError _________________ ERROR at setup of test_build_all[pseudoxml] __________________ request = > rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture def nonascii_srcdir(request, rootdir, sphinx_test_tempdir): # If supported, build in a non-ASCII source dir test_name = u'\u65e5\u672c\u8a9e' basedir = sphinx_test_tempdir / request.node.originalname # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # so we force a non-unicode path in that case if (sys.platform == "win32" and not (sys.version_info.major >= 3 and sys.version_info.minor >= 2)): return basedir / 'all' try: srcdir = basedir / test_name if not srcdir.exists(): (rootdir / 'test-root').copytree(srcdir) except UnicodeEncodeError: srcdir = basedir / 'all' else: # add a doc with a non-ASCII file name to the source dir (srcdir / (test_name + '.txt')).write_text(dedent(""" nonascii file name page ======================= > """)) tests/test_build.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_build_all/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' nonascii file name page ======================= ', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError _________________ ERROR at setup of test_build_all[linkcheck] __________________ request = > rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture def nonascii_srcdir(request, rootdir, sphinx_test_tempdir): # If supported, build in a non-ASCII source dir test_name = u'\u65e5\u672c\u8a9e' basedir = sphinx_test_tempdir / request.node.originalname # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # so we force a non-unicode path in that case if (sys.platform == "win32" and not (sys.version_info.major >= 3 and sys.version_info.minor >= 2)): return basedir / 'all' try: srcdir = basedir / test_name if not srcdir.exists(): (rootdir / 'test-root').copytree(srcdir) except UnicodeEncodeError: srcdir = basedir / 'all' else: # add a doc with a non-ASCII file name to the source dir (srcdir / (test_name + '.txt')).write_text(dedent(""" nonascii file name page ======================= > """)) tests/test_build.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_build_all/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' nonascii file name page ======================= ', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError _________________ ERROR at setup of test_compile_all_catalogs __________________ test_params = {'shared_result': 'test-catalogs'} app_params = app_params(args=['html'], kwargs={'confoverrides': {'locale_dirs': ['./locale'...srcdir': path(u'/<>/tests/build/test-catalogs')}) make_app = shared_result = @pytest.fixture(scope='function') def app(test_params, app_params, make_app, shared_result): """ provides sphinx.application.Sphinx object """ args, kwargs = app_params > app_ = make_app(*args, **kwargs) sphinx/testing/fixtures.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:142: in __init__ freshenv, warningiserror, tags) sphinx/application.py:209: in __init__ self._init_i18n() sphinx/application.py:279: in _init_i18n catinfo.write_mo(self.config.language) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CatalogInfo(base_dir=u'/<>/tests/build/test-catalogs/./locale/en/LC_MESSAGES', domain=u'sphinx', charset='utf-8-sig') locale = 'en' def write_mo(self, locale): # type: (unicode) -> None > with open(self.po_path, 'rt', encoding=self.charset) as file_po: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/i18n.py:71: TypeError _______________ ERROR at setup of test_compile_specific_catalogs _______________ test_params = {'shared_result': 'test-catalogs'} app_params = app_params(args=['html'], kwargs={'confoverrides': {'locale_dirs': ['./locale'...srcdir': path(u'/<>/tests/build/test-catalogs')}) make_app = shared_result = @pytest.fixture(scope='function') def app(test_params, app_params, make_app, shared_result): """ provides sphinx.application.Sphinx object """ args, kwargs = app_params > app_ = make_app(*args, **kwargs) sphinx/testing/fixtures.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:142: in __init__ freshenv, warningiserror, tags) sphinx/application.py:209: in __init__ self._init_i18n() sphinx/application.py:279: in _init_i18n catinfo.write_mo(self.config.language) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CatalogInfo(base_dir=u'/<>/tests/build/test-catalogs/./locale/en/LC_MESSAGES', domain=u'sphinx', charset='utf-8-sig') locale = 'en' def write_mo(self, locale): # type: (unicode) -> None > with open(self.po_path, 'rt', encoding=self.charset) as file_po: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/i18n.py:71: TypeError ________________ ERROR at setup of test_compile_update_catalogs ________________ test_params = {'shared_result': 'test-catalogs'} app_params = app_params(args=['html'], kwargs={'confoverrides': {'locale_dirs': ['./locale'...srcdir': path(u'/<>/tests/build/test-catalogs')}) make_app = shared_result = @pytest.fixture(scope='function') def app(test_params, app_params, make_app, shared_result): """ provides sphinx.application.Sphinx object """ args, kwargs = app_params > app_ = make_app(*args, **kwargs) sphinx/testing/fixtures.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:142: in __init__ freshenv, warningiserror, tags) sphinx/application.py:209: in __init__ self._init_i18n() sphinx/application.py:279: in _init_i18n catinfo.write_mo(self.config.language) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CatalogInfo(base_dir=u'/<>/tests/build/test-catalogs/./locale/en/LC_MESSAGES', domain=u'sphinx', charset='utf-8-sig') locale = 'en' def write_mo(self, locale): # type: (unicode) -> None > with open(self.po_path, 'rt', encoding=self.charset) as file_po: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/i18n.py:71: TypeError _____________________ ERROR at setup of test_needs_sphinx ______________________ make_app = tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_needs_sphinx0') @pytest.fixture def make_app_with_empty_project(make_app, tempdir): > (tempdir / 'conf.py').write_text('') tests/test_config.py:163: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_needs_sphinx0/conf.py') text = '', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ____________ ERROR at setup of test_html_with_default_docutilsconf _____________ test_params = {'shared_result': None} app_params = app_params(args=['html'], kwargs={'freshenv': True, 'docutilsconf': '', 'srcdir': path(u'/<>/tests/build/docutilsconf')}) make_app = shared_result = @pytest.fixture(scope='function') def app(test_params, app_params, make_app, shared_result): """ provides sphinx.application.Sphinx object """ args, kwargs = app_params > app_ = make_app(*args, **kwargs) sphinx/testing/fixtures.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:114: in __init__ (srcdir / 'docutils.conf').write_text(docutilsconf) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/docutilsconf/docutils.conf') text = '', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ________________ ERROR at setup of test_html_with_docutilsconf _________________ test_params = {'shared_result': None} app_params = app_params(args=['html'], kwargs={'freshenv': True, 'docutilsconf': '\n[html4c...'srcdir': path(u'/<>/tests/build/docutilsconf')}) make_app = shared_result = @pytest.fixture(scope='function') def app(test_params, app_params, make_app, shared_result): """ provides sphinx.application.Sphinx object """ args, kwargs = app_params > app_ = make_app(*args, **kwargs) sphinx/testing/fixtures.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:114: in __init__ (srcdir / 'docutils.conf').write_text(docutilsconf) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/docutilsconf/docutils.conf') text = ' [html4css1 writer] option-limit:1 field-name-limit:1 ' encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ________________________ ERROR at setup of test_simple _________________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_simple0') apidoc_params = ([], {'coderoot': 'test-root'}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_simple0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_simple0/out/autodoc_fodder.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_simple0/out/autodoc_missing_imports.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_simple0/out/autodoc_target.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_simple0/out/conf.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_simple0/out/parsermod.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_simple0/out/conf.py. ___________________ ERROR at setup of test_pep_0420_enabled ____________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled0') apidoc_params = ([], {'coderoot': 'test-apidoc-pep420/a', 'options': ['--implicit-namespaces']}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled0/out/a.b.c.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled0/out/a.b.e.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled0/out/a.b.x.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled0/out/conf.py. _______________ ERROR at setup of test_pep_0420_enabled_separate _______________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled_separate0') apidoc_params = ([], {'coderoot': 'test-apidoc-pep420/a', 'options': ['--implicit-namespaces', '--separate']}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled_separate0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled_separate0/out/a.b.c.d.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled_separate0/out/a.b.c.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled_separate0/out/a.b.e.f.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled_separate0/out/a.b.e.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled_separate0/out/a.b.x.y.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled_separate0/out/a.b.x.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_enabled_separate0/out/conf.py. ___________________ ERROR at setup of test_pep_0420_disabled ___________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_pep_0420_disabled0') apidoc_params = ([], {'coderoot': 'test-apidoc-pep420/a'}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_pep_0420_disabled0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_disabled0/out/conf.py. __________ ERROR at setup of test_pep_0420_disabled_top_level_verify ___________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_pep_0420_disabled_top_lev0') apidoc_params = ([], {'coderoot': 'test-apidoc-pep420/a/b'}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_pep_0420_disabled_top_lev0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_disabled_top_lev0/out/c.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_disabled_top_lev0/out/e.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_pep_0420_disabled_top_lev0/out/conf.py. __________________ ERROR at setup of test_trailing_underscore __________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_trailing_underscore0') apidoc_params = ([], {'coderoot': 'test-apidoc-trailing-underscore'}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_trailing_underscore0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_trailing_underscore0/out/package_.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_trailing_underscore0/out/conf.py. _______________________ ERROR at setup of test_excludes ________________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_excludes0') apidoc_params = ([], {'coderoot': 'test-apidoc-pep420/a', 'excludes': ['b/c/d.py', 'b/e/f.py', 'b/e/__init__.py'], 'options': ['--implicit-namespaces', '--separate']}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_excludes0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes0/out/a.b.c.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes0/out/a.b.x.y.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes0/out/a.b.x.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes0/out/conf.py. _________ ERROR at setup of test_excludes_subpackage_should_be_skipped _________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_excludes_subpackage_shoul0') apidoc_params = ([], {'coderoot': 'test-apidoc-pep420/a', 'excludes': ['b/e'], 'options': ['--implicit-namespaces', '--separate']}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_excludes_subpackage_shoul0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_subpackage_shoul0/out/a.b.c.d.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_subpackage_shoul0/out/a.b.c.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_subpackage_shoul0/out/a.b.x.y.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_subpackage_shoul0/out/a.b.x.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_subpackage_shoul0/out/conf.py. ___________ ERROR at setup of test_excludes_module_should_be_skipped ___________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_be0') apidoc_params = ([], {'coderoot': 'test-apidoc-pep420/a', 'excludes': ['b/e/f.py'], 'options': ['--implicit-namespaces', '--separate']}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_be0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_be0/out/a.b.c.d.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_be0/out/a.b.c.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_be0/out/a.b.e.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_be0/out/a.b.x.y.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_be0/out/a.b.x.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_be0/out/conf.py. _________ ERROR at setup of test_excludes_module_should_not_be_skipped _________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_no0') apidoc_params = ([], {'coderoot': 'test-apidoc-pep420/a', 'excludes': [], 'options': ['--implicit-namespaces', '--separate']}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_no0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_no0/out/a.b.c.d.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_no0/out/a.b.c.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_no0/out/a.b.e.f.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_no0/out/a.b.e.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_no0/out/a.b.x.y.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_no0/out/a.b.x.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_excludes_module_should_no0/out/conf.py. _________________ ERROR at setup of test_multibyte_parameters __________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_multibyte_parameters0') apidoc_params = ([], {'coderoot': 'test-root', 'options': ['--doc-project', 'プロジェクト名', '--doc-author', '著者名', '--doc-version', 'バージョン', ...]}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_multibyte_parameters0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_multibyte_parameters0/out/autodoc_fodder.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_multibyte_parameters0/out/autodoc_missing_imports.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_multibyte_parameters0/out/autodoc_target.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_multibyte_parameters0/out/conf.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_multibyte_parameters0/out/parsermod.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_multibyte_parameters0/out/conf.py. ___________________ ERROR at setup of test_extension_parsed ____________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_extension_parsed0') apidoc_params = ([], {'coderoot': 'test-root', 'options': ['--ext-mathjax']}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_extension_parsed0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_extension_parsed0/out/autodoc_fodder.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_extension_parsed0/out/autodoc_missing_imports.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_extension_parsed0/out/autodoc_target.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_extension_parsed0/out/conf.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_extension_parsed0/out/parsermod.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_extension_parsed0/out/conf.py. ____ ERROR at setup of test_toc_all_references_should_exist_pep420_enabled _____ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should0') apidoc_params = ([], {'coderoot': 'test-apidoc-toc/mypackage', 'options': ['--implicit-namespaces']}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should0/out/mypackage.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should0/out/mypackage.no_init.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should0/out/mypackage.resource.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should0/out/mypackage.something.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should0/out/conf.py. ____ ERROR at setup of test_toc_all_references_should_exist_pep420_disabled ____ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should1') apidoc_params = ([], {'coderoot': 'test-apidoc-toc/mypackage'}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should1/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should1/out/mypackage.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should1/out/mypackage.resource.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should1/out/mypackage.something.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_toc_all_references_should1/out/conf.py. ___________________ ERROR at setup of test_subpackage_in_toc ___________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_subpackage_in_toc0') apidoc_params = ([], {'coderoot': 'test-apidoc-subpackage-in-toc', 'options': ['--separate']}) @pytest.fixture() def apidoc(rootdir, tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = rootdir / kwargs.get('coderoot', 'test-root') outdir = tempdir / 'out' excludes = [coderoot / e for e in kwargs.get('excludes', [])] args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', []) > apidoc_main(args) tests/test_ext_apidoc.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/ext/apidoc.py:457: in main qs.generate(d, silent=True, overwrite=args.force) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_subpackage_in_toc0/out/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ---------------------------- Captured stdout setup ----------------------------- Creating file /tmp/pytest-of-buildd/pytest-0/test_subpackage_in_toc0/out/parent.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_subpackage_in_toc0/out/parent.child.foo.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_subpackage_in_toc0/out/parent.child.rst. Creating file /tmp/pytest-of-buildd/pytest-0/test_subpackage_in_toc0/out/conf.py. _______________________ ERROR at setup of test_escaping ________________________ test_params = {'shared_result': None} app_params = app_params(args=['xml'], kwargs={'confoverrides': {'source_suffix': '.rst', 'a... 'srcdir': path(u'/<>/tests/build/autosummary')}) make_app = shared_result = @pytest.fixture(scope='function') def app(test_params, app_params, make_app, shared_result): """ provides sphinx.application.Sphinx object """ args, kwargs = app_params > app_ = make_app(*args, **kwargs) sphinx/testing/fixtures.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:142: in __init__ freshenv, warningiserror, tags) sphinx/application.py:263: in __init__ self._init_builder() sphinx/application.py:325: in _init_builder self.emit('builder-inited') sphinx/application.py:510: in emit return self.events.emit(event, self, *args) sphinx/events.py:80: in emit results.append(callback(*args)) sphinx/ext/autosummary/__init__.py:696: in process_generate_options app=app) sphinx/ext/autosummary/generate.py:136: in generate_autosummary_docs items = find_autosummary_in_files(sources) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filenames = ['/<>/tests/build/autosummary/sphinx.rst', '/<>/tests/build/autosummary/contents.rst'] def find_autosummary_in_files(filenames): # type: (List[unicode]) -> List[Tuple[unicode, unicode, unicode]] """Find out what items are documented in source/*.rst. See `find_autosummary_in_lines`. """ documented = [] # type: List[Tuple[unicode, unicode, unicode]] for filename in filenames: with open(filename, 'r', encoding='utf-8', # type: ignore > errors='ignore') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/ext/autosummary/generate.py:252: TypeError _________________ ERROR at setup of test_autosummary_generate __________________ test_params = {'shared_result': None} app_params = app_params(args=['dummy'], kwargs={'srcdir': path(u'/<>/tests/build/ext-autosummary')}) make_app = shared_result = @pytest.fixture(scope='function') def app(test_params, app_params, make_app, shared_result): """ provides sphinx.application.Sphinx object """ args, kwargs = app_params > app_ = make_app(*args, **kwargs) sphinx/testing/fixtures.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:142: in __init__ freshenv, warningiserror, tags) sphinx/application.py:263: in __init__ self._init_builder() sphinx/application.py:325: in _init_builder self.emit('builder-inited') sphinx/application.py:510: in emit return self.events.emit(event, self, *args) sphinx/events.py:80: in emit results.append(callback(*args)) sphinx/ext/autosummary/__init__.py:696: in process_generate_options app=app) sphinx/ext/autosummary/generate.py:136: in generate_autosummary_docs items = find_autosummary_in_files(sources) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filenames = ['/<>/tests/build/ext-autosummary/contents.rst'] def find_autosummary_in_files(filenames): # type: (List[unicode]) -> List[Tuple[unicode, unicode, unicode]] """Find out what items are documented in source/*.rst. See `find_autosummary_in_lines`. """ documented = [] # type: List[Tuple[unicode, unicode, unicode]] for filename in filenames: with open(filename, 'r', encoding='utf-8', # type: ignore > errors='ignore') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/ext/autosummary/generate.py:252: TypeError ____________ ERROR at setup of test_autosummary_latex_table_colspec ____________ test_params = {'shared_result': None} app_params = app_params(args=['latex'], kwargs={'confoverrides': {'source_suffix': '.rst', ... 'srcdir': path(u'/<>/tests/build/autosummary')}) make_app = shared_result = @pytest.fixture(scope='function') def app(test_params, app_params, make_app, shared_result): """ provides sphinx.application.Sphinx object """ args, kwargs = app_params > app_ = make_app(*args, **kwargs) sphinx/testing/fixtures.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:142: in __init__ freshenv, warningiserror, tags) sphinx/application.py:263: in __init__ self._init_builder() sphinx/application.py:325: in _init_builder self.emit('builder-inited') sphinx/application.py:510: in emit return self.events.emit(event, self, *args) sphinx/events.py:80: in emit results.append(callback(*args)) sphinx/ext/autosummary/__init__.py:696: in process_generate_options app=app) sphinx/ext/autosummary/generate.py:136: in generate_autosummary_docs items = find_autosummary_in_files(sources) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filenames = ['/<>/tests/build/autosummary/sphinx.rst', '/<>/tests/build/autosummary/contents.rst'] def find_autosummary_in_files(filenames): # type: (List[unicode]) -> List[Tuple[unicode, unicode, unicode]] """Find out what items are documented in source/*.rst. See `find_autosummary_in_lines`. """ documented = [] # type: List[Tuple[unicode, unicode, unicode]] for filename in filenames: with open(filename, 'r', encoding='utf-8', # type: ignore > errors='ignore') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/ext/autosummary/generate.py:252: TypeError _________________________ ERROR at setup of test_build _________________________ test_params = {'shared_result': None} app_params = app_params(args=['doctest'], kwargs={'srcdir': path(u'/<>/tests/build/ext-doctest')}) make_app = shared_result = @pytest.fixture(scope='function') def app(test_params, app_params, make_app, shared_result): """ provides sphinx.application.Sphinx object """ args, kwargs = app_params > app_ = make_app(*args, **kwargs) sphinx/testing/fixtures.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:142: in __init__ freshenv, warningiserror, tags) sphinx/application.py:263: in __init__ self._init_builder() sphinx/application.py:324: in _init_builder self.builder.init() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def init(self): # type: () -> None # default options self.opt = self.config.doctest_default_flags # HACK HACK HACK # doctest compiles its snippets with type 'single'. That is nice # for doctest examples but unusable for multi-statement code such # as setup code -- to be able to use doctest error reporting with # that code nevertheless, we monkey-patch the "compile" it uses. doctest.compile = self.compile # type: ignore sys.path[0:0] = self.config.doctest_path self.type = 'single' self.total_failures = 0 self.total_tries = 0 self.setup_failures = 0 self.setup_tries = 0 self.cleanup_failures = 0 self.cleanup_tries = 0 date = time.strftime('%Y-%m-%d %H:%M:%S') self.outfile = None # type: IO self.outfile = open(path.join(self.outdir, 'output.txt'), # type: ignore > 'w', encoding='utf-8') E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/ext/doctest.py:314: TypeError ________________________ ERROR at setup of test_skipif _________________________ test_params = {'shared_result': None} app_params = app_params(args=['doctest'], kwargs={'srcdir': path(u'/<>/tests/build/ext-doctest-skipif')}) make_app = shared_result = @pytest.fixture(scope='function') def app(test_params, app_params, make_app, shared_result): """ provides sphinx.application.Sphinx object """ args, kwargs = app_params > app_ = make_app(*args, **kwargs) sphinx/testing/fixtures.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:142: in __init__ freshenv, warningiserror, tags) sphinx/application.py:263: in __init__ self._init_builder() sphinx/application.py:324: in _init_builder self.builder.init() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def init(self): # type: () -> None # default options self.opt = self.config.doctest_default_flags # HACK HACK HACK # doctest compiles its snippets with type 'single'. That is nice # for doctest examples but unusable for multi-statement code such # as setup code -- to be able to use doctest error reporting with # that code nevertheless, we monkey-patch the "compile" it uses. doctest.compile = self.compile # type: ignore sys.path[0:0] = self.config.doctest_path self.type = 'single' self.total_failures = 0 self.total_tries = 0 self.setup_failures = 0 self.setup_tries = 0 self.cleanup_failures = 0 self.cleanup_tries = 0 date = time.strftime('%Y-%m-%d %H:%M:%S') self.outfile = None # type: IO self.outfile = open(path.join(self.outdir, 'output.txt'), # type: ignore > 'w', encoding='utf-8') E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/ext/doctest.py:314: TypeError ____________ ERROR at setup of test_build_sphinx_with_nonascii_path ____________ request = > setup_command = setup(pkgroot=path(u'/tmp/pytest-of-buildd/pytest-0/test_build_sphinx_with_nonasci0/test-setup'), proc=) @pytest.fixture def nonascii_srcdir(request, setup_command): mb_name = u'\u65e5\u672c\u8a9e' srcdir = (setup_command.pkgroot / 'doc') try: (srcdir / mb_name).makedirs() except UnicodeEncodeError: from sphinx.testing.path import FILESYSTEMENCODING pytest.skip( 'non-ASCII filename not supported on this filesystem encoding: ' '%s' % FILESYSTEMENCODING) (srcdir / mb_name / (mb_name + '.txt')).write_text(dedent(""" multi byte file name page ========================== > """)) /<>/.pybuild/cpython2_2.7/build/tests/test_setup_command.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_build_sphinx_with_nonasci0/test-setup/doc/\u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e.txt') text = ' multi byte file name page ========================== ' encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError _______________________ ERROR at setup of test_get_ratio _______________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture(scope='module', autouse=True) def setup_module(rootdir, sphinx_test_tempdir): global app, original, original_uids srcdir = sphinx_test_tempdir / 'test-versioning' if not srcdir.exists(): (rootdir / 'test-versioning').copytree(srcdir) app = SphinxTestApp(srcdir=srcdir) app.builder.env.app = app app.connect('doctree-resolved', on_doctree_resolved) > app.build() tests/test_versioning.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['added', 'deleted', 'deleted_end', 'index', 'insert', 'insert_beginning', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError _______________________ ERROR at setup of test_add_uids ________________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture(scope='module', autouse=True) def setup_module(rootdir, sphinx_test_tempdir): global app, original, original_uids srcdir = sphinx_test_tempdir / 'test-versioning' if not srcdir.exists(): (rootdir / 'test-versioning').copytree(srcdir) app = SphinxTestApp(srcdir=srcdir) app.builder.env.app = app app.connect('doctree-resolved', on_doctree_resolved) > app.build() tests/test_versioning.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['added', 'deleted', 'deleted_end', 'index', 'insert', 'insert_beginning', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError _____________________ ERROR at setup of test_picklablility _____________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture(scope='module', autouse=True) def setup_module(rootdir, sphinx_test_tempdir): global app, original, original_uids srcdir = sphinx_test_tempdir / 'test-versioning' if not srcdir.exists(): (rootdir / 'test-versioning').copytree(srcdir) app = SphinxTestApp(srcdir=srcdir) app.builder.env.app = app app.connect('doctree-resolved', on_doctree_resolved) > app.build() tests/test_versioning.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['added', 'deleted', 'deleted_end', 'index', 'insert', 'insert_beginning', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError _______________________ ERROR at setup of test_modified ________________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture(scope='module', autouse=True) def setup_module(rootdir, sphinx_test_tempdir): global app, original, original_uids srcdir = sphinx_test_tempdir / 'test-versioning' if not srcdir.exists(): (rootdir / 'test-versioning').copytree(srcdir) app = SphinxTestApp(srcdir=srcdir) app.builder.env.app = app app.connect('doctree-resolved', on_doctree_resolved) > app.build() tests/test_versioning.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['added', 'deleted', 'deleted_end', 'index', 'insert', 'insert_beginning', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError _________________________ ERROR at setup of test_added _________________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture(scope='module', autouse=True) def setup_module(rootdir, sphinx_test_tempdir): global app, original, original_uids srcdir = sphinx_test_tempdir / 'test-versioning' if not srcdir.exists(): (rootdir / 'test-versioning').copytree(srcdir) app = SphinxTestApp(srcdir=srcdir) app.builder.env.app = app app.connect('doctree-resolved', on_doctree_resolved) > app.build() tests/test_versioning.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['added', 'deleted', 'deleted_end', 'index', 'insert', 'insert_beginning', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError ________________________ ERROR at setup of test_deleted ________________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture(scope='module', autouse=True) def setup_module(rootdir, sphinx_test_tempdir): global app, original, original_uids srcdir = sphinx_test_tempdir / 'test-versioning' if not srcdir.exists(): (rootdir / 'test-versioning').copytree(srcdir) app = SphinxTestApp(srcdir=srcdir) app.builder.env.app = app app.connect('doctree-resolved', on_doctree_resolved) > app.build() tests/test_versioning.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['added', 'deleted', 'deleted_end', 'index', 'insert', 'insert_beginning', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError ______________________ ERROR at setup of test_deleted_end ______________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture(scope='module', autouse=True) def setup_module(rootdir, sphinx_test_tempdir): global app, original, original_uids srcdir = sphinx_test_tempdir / 'test-versioning' if not srcdir.exists(): (rootdir / 'test-versioning').copytree(srcdir) app = SphinxTestApp(srcdir=srcdir) app.builder.env.app = app app.connect('doctree-resolved', on_doctree_resolved) > app.build() tests/test_versioning.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['added', 'deleted', 'deleted_end', 'index', 'insert', 'insert_beginning', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError ________________________ ERROR at setup of test_insert _________________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture(scope='module', autouse=True) def setup_module(rootdir, sphinx_test_tempdir): global app, original, original_uids srcdir = sphinx_test_tempdir / 'test-versioning' if not srcdir.exists(): (rootdir / 'test-versioning').copytree(srcdir) app = SphinxTestApp(srcdir=srcdir) app.builder.env.app = app app.connect('doctree-resolved', on_doctree_resolved) > app.build() tests/test_versioning.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['added', 'deleted', 'deleted_end', 'index', 'insert', 'insert_beginning', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError ___________________ ERROR at setup of test_insert_beginning ____________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture(scope='module', autouse=True) def setup_module(rootdir, sphinx_test_tempdir): global app, original, original_uids srcdir = sphinx_test_tempdir / 'test-versioning' if not srcdir.exists(): (rootdir / 'test-versioning').copytree(srcdir) app = SphinxTestApp(srcdir=srcdir) app.builder.env.app = app app.connect('doctree-resolved', on_doctree_resolved) > app.build() tests/test_versioning.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['added', 'deleted', 'deleted_end', 'index', 'insert', 'insert_beginning', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError ____________________ ERROR at setup of test_insert_similar _____________________ rootdir = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots') sphinx_test_tempdir = path(u'/<>/tests/build') @pytest.fixture(scope='module', autouse=True) def setup_module(rootdir, sphinx_test_tempdir): global app, original, original_uids srcdir = sphinx_test_tempdir / 'test-versioning' if not srcdir.exists(): (rootdir / 'test-versioning').copytree(srcdir) app = SphinxTestApp(srcdir=srcdir) app.builder.env.app = app app.connect('doctree-resolved', on_doctree_resolved) > app.build() tests/test_versioning.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['added', 'deleted', 'deleted_end', 'index', 'insert', 'insert_beginning', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError =================================== FAILURES =================================== __________________________ test_master_doc_not_found ___________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_master_doc_not_found0') make_app = def test_master_doc_not_found(tempdir, make_app): > (tempdir / 'conf.py').write_text('master_doc = "index"') tests/test_build.py:82: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_master_doc_not_found0/conf.py') text = 'master_doc = "index"', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ____________________________ test_circular_toctree _____________________________ app = status = warning = @pytest.mark.sphinx(buildername='text', testroot='circular') def test_circular_toctree(app, status, warning): > app.builder.build_all() tests/test_build.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/circular # outdir: /<>/tests/build/circular/_build/text # status: Running Sphinx v1.8.5 building [text]: all source files updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] contents reading sources... [100%] sub looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 50%] contents # warning: /<>/tests/build/circular/sub.rst: WARNING: circular toctree references detected, ignoring: sub <- contents <- sub ________________________ test_numbered_circular_toctree ________________________ app = status = warning = @pytest.mark.sphinx(buildername='text', testroot='numbered-circular') def test_numbered_circular_toctree(app, status, warning): > app.builder.build_all() tests/test_build.py:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/numbered-circular # outdir: /<>/tests/build/numbered-circular/_build/text # status: Running Sphinx v1.8.5 building [text]: all source files updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] contents reading sources... [100%] sub looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 50%] contents # warning: /<>/tests/build/numbered-circular/sub.rst:1: WARNING: contents is already assigned section numbers (nested numbered toctree?) /<>/tests/build/numbered-circular/sub.rst: WARNING: circular toctree references detected, ignoring: sub <- contents <- sub ____________________________ test_applehelp_output _____________________________ app = status = warning = @pytest.mark.sphinx( 'applehelp', testroot='basic', srcdir='applehelp_output', confoverrides={'applehelp_bundle_id': 'org.sphinx-doc.Sphinx.help', 'applehelp_disable_external_tools': True}) def test_applehelp_output(app, status, warning): (app.srcdir / 'en.lproj').makedirs() > (app.srcdir / 'en.lproj' / 'localized.txt').write_text('') tests/test_build_applehelp.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/applehelp_output/en.lproj/localized.txt') text = '', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: applehelp # srcdir: /<>/tests/build/applehelp_output # outdir: /<>/tests/build/applehelp_output/_build/applehelp # status: Running Sphinx v1.8.5 # warning: __________________________________ test_build __________________________________ app = @pytest.mark.sphinx('changes', testroot='changes') def test_build(app): > app.build() tests/test_build_changes.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = ignored = (set([]), ['c-api', 'base', 'library/utils', 'contents'], 'update') version = '0.6' domain = libchanges = {'utils': [('Path: deprecated: Deprecated since version 0.6: So, that was a bad idea it turns out.', 'library/utils', 23)]} def write(self, *ignored): # type: (Any) -> None version = self.config.version domain = cast(ChangeSetDomain, self.env.get_domain('changeset')) libchanges = {} # type: Dict[unicode, List[Tuple[unicode, unicode, int]]] apichanges = [] # type: List[Tuple[unicode, unicode, int]] otherchanges = {} # type: Dict[Tuple[unicode, unicode], List[Tuple[unicode, unicode, int]]] # NOQA if version not in self.env.versionchanges: logger.info(bold(__('no changes in version %s.') % version)) return logger.info(bold('writing summary file...')) for changeset in domain.get_changesets_for(version): if isinstance(changeset.descname, tuple): descname = changeset.descname[0] else: descname = changeset.descname ttext = self.typemap[changeset.type] context = changeset.content.replace('\n', ' ') if descname and changeset.docname.startswith('c-api'): if context: entry = '%s: %s: %s' % (descname, ttext, context) else: entry = '%s: %s.' % (descname, ttext) apichanges.append((entry, changeset.docname, changeset.lineno)) elif descname or changeset.module: module = changeset.module or _('Builtins') if not descname: descname = _('Module level') if context: entry = '%s: %s: %s' % (descname, ttext, context) else: entry = '%s: %s.' % (descname, ttext) libchanges.setdefault(module, []).append((entry, changeset.docname, changeset.lineno)) else: if not context: continue entry = '%s: %s' % (ttext.capitalize(), context) title = self.env.titles[changeset.docname].astext() otherchanges.setdefault((changeset.docname, title), []).append( (entry, changeset.docname, changeset.lineno)) ctx = { 'project': self.config.project, 'version': version, 'docstitle': self.config.html_title, 'shorttitle': self.config.html_short_title, 'libchanges': sorted(iteritems(libchanges)), 'apichanges': sorted(apichanges), 'otherchanges': sorted(iteritems(otherchanges)), 'show_copyright': self.config.html_show_copyright, 'show_sphinx': self.config.html_show_sphinx, } with open(path.join(self.outdir, 'index.html'), 'w', # type: ignore > encoding='utf8') as f: E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/changes.py:117: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: changes # srcdir: /<>/tests/build/changes # outdir: /<>/tests/build/changes/_build/changes # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [changes]: targets for 68 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] base reading sources... [ 50%] c-api reading sources... [ 75%] contents reading sources... [100%] library/utils looking for now-outdated files... none found pickling environment... done checking consistency... done writing summary file... # warning: _______________________________ test_build_epub ________________________________ app = @pytest.mark.sphinx('epub', testroot='basic') def test_build_epub(app): > app.build() tests/test_build_epub.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/_epub_base.py:374: in write_doc StandaloneHTMLBuilder.write_doc(self, docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) sphinx/builders/_epub_base.py:473: in handle_page outfilename, event_arg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'index' addctx = {'body': '

The basic Sphinx documentation for...uptools integration

', 'display_toc': True, 'doctype': '', 'meta': {}, ...} templatename = 'page.html' outfilename = '/<>/tests/build/basic/_build/epub/index.xhtml' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: epub # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/epub # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [epub]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] index # warning: _______________________________ test_epub_cover ________________________________ app = @pytest.mark.sphinx('epub', testroot='footnotes', confoverrides={'epub_cover': ('_images/rimg.png', None)}) def test_epub_cover(app): > app.build() tests/test_build_epub.py:164: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/_epub_base.py:374: in write_doc StandaloneHTMLBuilder.write_doc(self, docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) sphinx/builders/_epub_base.py:473: in handle_page outfilename, event_arg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'bar' addctx = {'body': '

bar

Same footnote number

footnote in bar

', 'display_toc': False, 'doctype': '', 'meta': {}, ...} templatename = 'page.html' outfilename = '/<>/tests/build/footnotes/_build/epub/bar.xhtml' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: epub # srcdir: /<>/tests/build/footnotes # outdir: /<>/tests/build/footnotes/_build/epub # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [epub]: targets for 3 source files that are out of date updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] baz reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 33%] bar # warning: _______________________________ test_nested_toc ________________________________ app = @pytest.mark.sphinx('epub', testroot='toctree') def test_nested_toc(app): > app.build() tests/test_build_epub.py:176: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/_epub_base.py:374: in write_doc StandaloneHTMLBuilder.write_doc(self, docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) sphinx/builders/_epub_base.py:473: in handle_page outfilename, event_arg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'bar' addctx = {'body': '

2. bar

', 'display_toc': False, 'doctype': '', 'meta': {}, ...} templatename = 'page.html' outfilename = '/<>/tests/build/toctree/_build/epub/bar.xhtml' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: epub # srcdir: /<>/tests/build/toctree # outdir: /<>/tests/build/toctree/_build/epub # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [epub]: targets for 7 source files that are out of date updating environment: 7 added, 0 changed, 0 removed reading sources... [ 14%] bar reading sources... [ 28%] baz reading sources... [ 42%] foo reading sources... [ 57%] index reading sources... [ 71%] quux reading sources... [ 85%] qux reading sources... [100%] tocdepth looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 14%] bar # warning: /<>/tests/build/toctree/qux.rst: WARNING: document isn't included in any toctree /<>/tests/build/toctree/tocdepth.rst: WARNING: document isn't included in any toctree _______________________________ test_escaped_toc _______________________________ app = @pytest.mark.sphinx('epub', testroot='need-escaped') def test_escaped_toc(app): > app.build() tests/test_build_epub.py:231: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/_epub_base.py:374: in write_doc StandaloneHTMLBuilder.write_doc(self, docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) sphinx/builders/_epub_base.py:473: in handle_page outfilename, event_arg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'bar' addctx = {'body': '

2. bar

', 'display_toc': False, 'doctype': '', 'meta': {}, ...} templatename = 'page.html' outfilename = '/<>/tests/build/need-escaped/_build/epub/bar.xhtml' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: epub # srcdir: /<>/tests/build/need-escaped # outdir: /<>/tests/build/need-escaped/_build/epub # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [epub]: targets for 6 source files that are out of date updating environment: 6 added, 0 changed, 0 removed reading sources... [ 16%] bar reading sources... [ 33%] baz reading sources... [ 50%] foo reading sources... [ 66%] index reading sources... [ 83%] quux reading sources... [100%] qux looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 16%] bar # warning: ____________________________ test_epub_writing_mode ____________________________ app = @pytest.mark.sphinx('epub', testroot='basic') def test_epub_writing_mode(app): # horizontal (default) > app.build() tests/test_build_epub.py:288: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/_epub_base.py:374: in write_doc StandaloneHTMLBuilder.write_doc(self, docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) sphinx/builders/_epub_base.py:473: in handle_page outfilename, event_arg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'index' addctx = {'body': '

The basic Sphinx documentation for...uptools integration

', 'display_toc': True, 'doctype': '', 'meta': {}, ...} templatename = 'page.html' outfilename = '/<>/tests/build/basic/_build/epub/index.xhtml' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: epub # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/epub # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [epub]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] index # warning: _____________________________ test_epub_anchor_id ______________________________ app = @pytest.mark.sphinx('epub', testroot='epub-anchor-id') def test_epub_anchor_id(app): > app.build() tests/test_build_epub.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/_epub_base.py:374: in write_doc StandaloneHTMLBuilder.write_doc(self, docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) sphinx/builders/_epub_base.py:473: in handle_page outfilename, event_arg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'index' addctx = {'body': '

test-epub-anchor-id

> def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: epub # srcdir: /<>/tests/build/epub-anchor-id # outdir: /<>/tests/build/epub-anchor-id/_build/epub # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [epub]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] index # warning: _______________________________ test_epub_assets _______________________________ app = @pytest.mark.sphinx('epub', testroot='html_assets') def test_epub_assets(app): > app.builder.build_all() tests/test_build_epub.py:331: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/_epub_base.py:374: in write_doc StandaloneHTMLBuilder.write_doc(self, docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) sphinx/builders/_epub_base.py:473: in handle_page outfilename, event_arg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'index' addctx = {'body': '

test-html_extra_path

this is dummy content

', 'display_toc': False, 'doctype': '', 'meta': {}, ...} templatename = 'page.html' outfilename = '/<>/tests/build/html_assets/_build/epub/index.xhtml' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: epub # srcdir: /<>/tests/build/html_assets # outdir: /<>/tests/build/html_assets/_build/epub # status: Running Sphinx v1.8.5 building [epub]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] index # warning: _____________________________ test_epub_css_files ______________________________ app = @pytest.mark.sphinx('epub', testroot='html_assets', confoverrides={'epub_css_files': ['css/epub.css']}) def test_epub_css_files(app): > app.builder.build_all() tests/test_build_epub.py:344: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/_epub_base.py:374: in write_doc StandaloneHTMLBuilder.write_doc(self, docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) sphinx/builders/_epub_base.py:473: in handle_page outfilename, event_arg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'index' addctx = {'body': '

test-html_extra_path

this is dummy content

', 'display_toc': False, 'doctype': '', 'meta': {}, ...} templatename = 'page.html' outfilename = '/<>/tests/build/html_assets/_build/epub/index.xhtml' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: epub # srcdir: /<>/tests/build/html_assets # outdir: /<>/tests/build/html_assets/_build/epub # status: Running Sphinx v1.8.5 loading pickled environment... done building [epub]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [100%] index # warning: ___________________________ test_html_download_role ____________________________ app = status = warning = @pytest.mark.sphinx('epub', testroot='roles-download') def test_html_download_role(app, status, warning): > app.build() tests/test_build_epub.py:359: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/_epub_base.py:374: in write_doc StandaloneHTMLBuilder.write_doc(self, docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) sphinx/builders/_epub_base.py:473: in handle_page outfilename, event_arg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'index' addctx = {'body': '

test-roles-download

', 'display_toc': False, 'doctype': '', 'meta': {}, ...} templatename = 'page.html' outfilename = '/<>/tests/build/roles-download/_build/epub/index.xhtml' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: epub # srcdir: /<>/tests/build/roles-download # outdir: /<>/tests/build/roles-download/_build/epub # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [epub]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] index # warning: /<>/tests/build/roles-download/index.rst:5: WARNING: download file not readable: /<>/tests/build/roles-download/not_found.dat ______________________________ test_build_gettext ______________________________ app = @pytest.mark.sphinx('gettext', srcdir='root-gettext') def test_build_gettext(app): # Generic build; should fail only when the builder is horribly broken. app.builder.build_all() # Do messages end up in the correct location? # top-level documents end up in a message catalog assert (app.outdir / 'extapi.pot').isfile() # directory items are grouped into sections assert (app.outdir / 'subdir.pot').isfile() # regression test for issue #960 > catalog = (app.outdir / 'markup.pot').text(encoding='utf-8') tests/test_build_gettext.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/root-gettext/_build/gettext/markup.pot') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: gettext # srcdir: /<>/tests/build/root-gettext # outdir: /<>/tests/build/root-gettext/_build/gettext # status: Running Sphinx v1.8.5 building [gettext]: targets for 3 template files reading templates... [ 33%] /<>/tests/build/root-gettext/_templates/contentssb.html reading templates... [ 66%] /<>/tests/build/root-gettext/_templates/customsb.html reading templates... [100%] /<>/tests/build/root-gettext/_templates/layout.html building [gettext]: all source files updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 6%] autodoc writing output... [ 12%] bom writing output... [ 18%] contents writing output... [ 25%] extapi writing output... [ 31%] extensions writing output... [ 37%] footnote writing output... [ 43%] images writing output... [ 50%] includes writing output... [ 56%] lists writing output... [ 62%] markup writing output... [ 68%] math writing output... [ 75%] metadata writing output... [ 81%] objects writing output... [ 87%] otherext writing output... [ 93%] subdir/images writing output... [100%] subdir/includes writing message catalogs... [ 6%] subdir writing message catalogs... [ 13%] otherext writing message catalogs... [ 20%] footnote writing message catalogs... [ 26%] markup writing message catalogs... [ 33%] lists writing message catalogs... [ 40%] includes writing message catalogs... [ 46%] objects writing message catalogs... [ 53%] extensions writing message catalogs... [ 60%] bom writing message catalogs... [ 66%] autodoc writing message catalogs... [ 73%] images writing message catalogs... [ 80%] metadata writing message catalogs... [ 86%] extapi writing message catalogs... [ 93%] contents writing message catalogs... [100%] math # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root-gettext/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root-gettext/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root-gettext/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root-gettext/nonexisting.png /<>/tests/build/root-gettext/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root-gettext/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________________ test_gettext_index_entries __________________________ app = @pytest.mark.sphinx( 'gettext', testroot='intl', srcdir='gettext', confoverrides={'gettext_compact': False}) def test_gettext_index_entries(app): # regression test for #976 app.builder.build(['index_entries']) _msgid_getter = re.compile(r'msgid "(.*)"').search def msgid_getter(msgid): m = _msgid_getter(msgid) if m: return m.groups()[0] return None > pot = (app.outdir / 'index_entries.pot').text(encoding='utf-8') tests/test_build_gettext.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/gettext/_build/gettext/index_entries.pot') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: gettext # srcdir: /<>/tests/build/gettext # outdir: /<>/tests/build/gettext/_build/gettext # status: Running Sphinx v1.8.5 building [gettext]: targets for 1 template files reading templates... [100%] /<>/tests/build/gettext/_templates/index.html updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions writing output... [ 7%] bom writing output... [ 11%] contents writing output... [ 14%] definition_terms writing output... [ 18%] docfields writing output... [ 22%] external_links writing output... [ 25%] figure writing output... [ 29%] footnote writing output... [ 33%] glossary_terms writing output... [ 37%] glossary_terms_inconsistency writing output... [ 40%] index_entries writing output... [ 44%] label_target writing output... [ 48%] literalblock writing output... [ 51%] only writing output... [ 55%] raw writing output... [ 59%] refs writing output... [ 62%] refs_inconsistency writing output... [ 66%] refs_python_domain writing output... [ 70%] role_xref writing output... [ 74%] rubric writing output... [ 77%] section writing output... [ 81%] seealso writing output... [ 85%] subdir/contents writing output... [ 88%] table writing output... [ 92%] topic writing output... [ 96%] versionchange writing output... [100%] warnings writing message catalogs... [ 3%] refs_python_domain writing message catalogs... [ 7%] figure writing message catalogs... [ 10%] subdir/contents writing message catalogs... [ 14%] footnote writing message catalogs... [ 17%] refs_inconsistency writing message catalogs... [ 21%] topic writing message catalogs... [ 25%] raw writing message catalogs... [ 28%] rubric writing message catalogs... [ 32%] versionchange writing message catalogs... [ 35%] table writing message catalogs... [ 39%] contents writing message catalogs... [ 42%] docfields writing message catalogs... [ 46%] role_xref writing message catalogs... [ 50%] section writing message catalogs... [ 53%] only writing message catalogs... [ 57%] refs writing message catalogs... [ 60%] warnings writing message catalogs... [ 64%] index_entries writing message catalogs... [ 67%] label_target writing message catalogs... [ 71%] definition_terms writing message catalogs... [ 75%] external_links writing message catalogs... [ 78%] seealso writing message catalogs... [ 82%] glossary_terms writing message catalogs... [ 85%] sphinx writing message catalogs... [ 89%] glossary_terms_inconsistency writing message catalogs... [ 92%] admonitions writing message catalogs... [ 96%] literalblock writing message catalogs... [100%] bom # warning: /<>/tests/build/gettext/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/gettext/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/gettext/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/gettext/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/table.txt: WARNING: document isn't included in any toctree ______________________ test_gettext_disable_index_entries ______________________ app = @pytest.mark.sphinx( 'gettext', testroot='intl', srcdir='gettext', confoverrides={'gettext_compact': False, 'gettext_additional_targets': []}) def test_gettext_disable_index_entries(app): # regression test for #976 app.builder.build(['index_entries']) _msgid_getter = re.compile(r'msgid "(.*)"').search def msgid_getter(msgid): m = _msgid_getter(msgid) if m: return m.groups()[0] return None > pot = (app.outdir / 'index_entries.pot').text(encoding='utf-8') tests/test_build_gettext.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/gettext/_build/gettext/index_entries.pot') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: gettext # srcdir: /<>/tests/build/gettext # outdir: /<>/tests/build/gettext/_build/gettext # status: Running Sphinx v1.8.5 loading pickled environment... done building [gettext]: targets for 1 template files reading templates... [100%] /<>/tests/build/gettext/_templates/index.html updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions writing output... [ 7%] bom writing output... [ 11%] contents writing output... [ 14%] definition_terms writing output... [ 18%] docfields writing output... [ 22%] external_links writing output... [ 25%] figure writing output... [ 29%] footnote writing output... [ 33%] glossary_terms writing output... [ 37%] glossary_terms_inconsistency writing output... [ 40%] index_entries writing output... [ 44%] label_target writing output... [ 48%] literalblock writing output... [ 51%] only writing output... [ 55%] raw writing output... [ 59%] refs writing output... [ 62%] refs_inconsistency writing output... [ 66%] refs_python_domain writing output... [ 70%] role_xref writing output... [ 74%] rubric writing output... [ 77%] section writing output... [ 81%] seealso writing output... [ 85%] subdir/contents writing output... [ 88%] table writing output... [ 92%] topic writing output... [ 96%] versionchange writing output... [100%] warnings writing message catalogs... [ 3%] refs_python_domain writing message catalogs... [ 7%] figure writing message catalogs... [ 10%] subdir/contents writing message catalogs... [ 14%] footnote writing message catalogs... [ 17%] refs_inconsistency writing message catalogs... [ 21%] topic writing message catalogs... [ 25%] raw writing message catalogs... [ 28%] rubric writing message catalogs... [ 32%] versionchange writing message catalogs... [ 35%] table writing message catalogs... [ 39%] contents writing message catalogs... [ 42%] docfields writing message catalogs... [ 46%] role_xref writing message catalogs... [ 50%] section writing message catalogs... [ 53%] only writing message catalogs... [ 57%] refs writing message catalogs... [ 60%] warnings writing message catalogs... [ 64%] index_entries writing message catalogs... [ 67%] label_target writing message catalogs... [ 71%] definition_terms writing message catalogs... [ 75%] external_links writing message catalogs... [ 78%] seealso writing message catalogs... [ 82%] glossary_terms writing message catalogs... [ 85%] sphinx writing message catalogs... [ 89%] glossary_terms_inconsistency writing message catalogs... [ 92%] admonitions writing message catalogs... [ 96%] literalblock writing message catalogs... [100%] bom # warning: /<>/tests/build/gettext/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/gettext/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/gettext/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/gettext/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/table.txt: WARNING: document isn't included in any toctree ____________________________ test_gettext_template _____________________________ app = @pytest.mark.sphinx('gettext', testroot='intl', srcdir='gettext') def test_gettext_template(app): app.builder.build_all() assert (app.outdir / 'sphinx.pot').isfile() > result = (app.outdir / 'sphinx.pot').text(encoding='utf-8') tests/test_build_gettext.py:165: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/gettext/_build/gettext/sphinx.pot') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: gettext # srcdir: /<>/tests/build/gettext # outdir: /<>/tests/build/gettext/_build/gettext # status: Running Sphinx v1.8.5 loading pickled environment... done building [gettext]: targets for 1 template files reading templates... [100%] /<>/tests/build/gettext/_templates/index.html building [gettext]: all source files updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions writing output... [ 7%] bom writing output... [ 11%] contents writing output... [ 14%] definition_terms writing output... [ 18%] docfields writing output... [ 22%] external_links writing output... [ 25%] figure writing output... [ 29%] footnote writing output... [ 33%] glossary_terms writing output... [ 37%] glossary_terms_inconsistency writing output... [ 40%] index_entries writing output... [ 44%] label_target writing output... [ 48%] literalblock writing output... [ 51%] only writing output... [ 55%] raw writing output... [ 59%] refs writing output... [ 62%] refs_inconsistency writing output... [ 66%] refs_python_domain writing output... [ 70%] role_xref writing output... [ 74%] rubric writing output... [ 77%] section writing output... [ 81%] seealso writing output... [ 85%] subdir/contents writing output... [ 88%] table writing output... [ 92%] topic writing output... [ 96%] versionchange writing output... [100%] warnings writing message catalogs... [ 3%] refs_python_domain writing message catalogs... [ 7%] figure writing message catalogs... [ 10%] footnote writing message catalogs... [ 14%] refs_inconsistency writing message catalogs... [ 17%] topic writing message catalogs... [ 21%] raw writing message catalogs... [ 25%] rubric writing message catalogs... [ 28%] versionchange writing message catalogs... [ 32%] table writing message catalogs... [ 35%] contents writing message catalogs... [ 39%] docfields writing message catalogs... [ 42%] role_xref writing message catalogs... [ 46%] section writing message catalogs... [ 50%] only writing message catalogs... [ 53%] subdir writing message catalogs... [ 57%] refs writing message catalogs... [ 60%] warnings writing message catalogs... [ 64%] index_entries writing message catalogs... [ 67%] label_target writing message catalogs... [ 71%] definition_terms writing message catalogs... [ 75%] external_links writing message catalogs... [ 78%] seealso writing message catalogs... [ 82%] glossary_terms writing message catalogs... [ 85%] sphinx writing message catalogs... [ 89%] glossary_terms_inconsistency writing message catalogs... [ 92%] admonitions writing message catalogs... [ 96%] literalblock writing message catalogs... [100%] bom # warning: /<>/tests/build/gettext/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/gettext/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/gettext/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/gettext/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/gettext/table.txt: WARNING: document isn't included in any toctree ________________ test_gettext_template_msgid_order_in_sphinxpot ________________ app = @pytest.mark.sphinx('gettext', testroot='gettext-template') def test_gettext_template_msgid_order_in_sphinxpot(app): app.builder.build_all() assert (app.outdir / 'sphinx.pot').isfile() > result = (app.outdir / 'sphinx.pot').text(encoding='utf-8') tests/test_build_gettext.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/gettext-template/_build/gettext/sphinx.pot') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: gettext # srcdir: /<>/tests/build/gettext-template # outdir: /<>/tests/build/gettext-template/_build/gettext # status: Running Sphinx v1.8.5 building [gettext]: targets for 2 template files reading templates... [ 50%] /<>/tests/build/gettext-template/_templates/template1.html reading templates... [100%] /<>/tests/build/gettext-template/_templates/template2.html building [gettext]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] contents looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] contents writing message catalogs... [ 50%] sphinx writing message catalogs... [100%] contents # warning: ______________________________ test_html_warnings ______________________________ app = warning = @pytest.mark.sphinx('html', testroot='warnings') def test_html_warnings(app, warning): > app.build() tests/test_build_html.py:131: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'undecodable']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/warnings # outdir: /<>/tests/build/warnings/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 2 source files that are out of date updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] index reading sources... [100%] undecodable looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/warnings/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/warnings/index.rst:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/warnings/index.rst:11: WARNING: image file not readable: foo.png /<>/tests/build/warnings/index.rst:24: WARNING: download file not readable: /<>/tests/build/warnings/nonexisting.png /<>/tests/build/warnings/index.rst:27: WARNING: invalid single index entry u'' /<>/tests/build/warnings/undecodable.rst:3: WARNING: undecodable source characters, replacing with "?": 'here: >>>\xbb<<<' ____________________ test_html_output[autodoc.html-expect0] ____________________ app = cached_etree_parse = , fname = 'autodoc.html' expect = (".//dt[@id='autodoc_target.Class']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[autodoc.html-expect1] ____________________ app = cached_etree_parse = , fname = 'autodoc.html' expect = (".//dt[@id='autodoc_target.function']/em", '\\*\\*kwds') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[autodoc.html-expect2] ____________________ app = cached_etree_parse = , fname = 'autodoc.html' expect = ('.//dd/p', 'Return spam\\.') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[extapi.html-expect3] _____________________ app = cached_etree_parse = , fname = 'extapi.html' expect = ('.//strong', 'from class: Bar') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect4] _____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//title', 'set by title directive') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect5] _____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p/em', 'Section author: Georg Brandl') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect6] _____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p/em', 'Module author: Georg Brandl') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect7] _____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//meta[@name='author'][@content='Me']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect8] _____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//meta[@name='keywords'][@content='docs, sphinx']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect9] _____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@id='label']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect10] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//pre', '^some code$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect11] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//span[@class='option']", '--help') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect12] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//p[@class='first admonition-title']", 'My Admonition') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect13] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//p[@class='last']", 'Note text.') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect14] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//p[@class='last']", 'Warning text.') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect15] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li/strong', '^command\\\\n$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect16] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li/strong', '^program\\\\n$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect17] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li/em', '^dfn\\\\n$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect18] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li/kbd', '^kbd\\\\n$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect19] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li/span', 'File ‣ Close') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect20] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//li/code/span[@class='pre']", '^a/$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect21] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//li/code/em/span[@class='pre']", '^varpart$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect22] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//li/code/em/span[@class='pre']", '^i$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect23] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='https://www.python.org/dev/peps/pep-0008'][@class='pep reference external']/strong", 'PEP 8') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect24] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='https://www.python.org/dev/peps/pep-0008'][@class='pep reference external']/strong", 'Python Enhancement Proposal #8') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect25] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='https://tools.ietf.org/html/rfc1.html'][@class='rfc reference external']/strong", 'RFC 1') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect26] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='https://tools.ietf.org/html/rfc1.html'][@class='rfc reference external']/strong", 'Request for Comments #1') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect27] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='objects.html#envvar-HOME'][@class='reference internal']/code/span[@class='pre']", 'HOME') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect28] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#with'][@class='reference internal']/code/span[@class='pre']", '^with$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect29] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#grammar-token-try-stmt'][@class='reference internal']/code/span", '^statement$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect30] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#some-label'][@class='reference internal']/span", '^here$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect31] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#some-label'][@class='reference internal']/span", '^there$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect32] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='subdir/includes.html'][@class='reference internal']/span", 'Including in subdir') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect33] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='objects.html#cmdoption-python-c'][@class='reference internal']/code/span[@class='pre']", '-c') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect34] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//abbr[@title='abbreviation']", '^abbr$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect35] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@class='versionadded']/p/span", 'New in version 0.6: ') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect36] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@class='versionadded']/p/span", ) @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect37] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@class='versionchanged']/p/span", ) @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect38] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect39] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@class='footnote-reference']", '\\[1\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect40] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='contents.html#ref1']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect41] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div/p[@class='first admonition-title']", 'See also') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect42] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect43] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//p[@class='centered']/strong", 'LICENSE') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect44] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//dl/dt[@id='term-boson']", 'boson') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect45] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//pre/strong', 'try_stmt') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect46] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect47] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p', 'A global substitution.') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect48] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p', 'In HTML.') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect49] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p', 'In both.') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect50] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p', 'Always present') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect51] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#with']/span", 'headings') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect52] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='objects.html#func_without_body']/code/span", 'objects') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect53] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect54] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li', 'Smart “quotes” in English ‘text’.') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect55] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li', 'Smart — long and – short dashes.') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect56] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li', 'Ellipsis…') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect57] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//li//code//span[@class='pre']", 'foo--"bar"...') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect58] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p', 'Этот «абзац» должен использовать „русские“ кавычки.') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html_output[markup.html-expect59] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p', 'Il dit : « C’est “super” ! »') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect60] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = ('.//pre', 'Max Strauß') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect61] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//a[@class='reference download internal']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect62] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = ('.//pre/span', '"quotes"') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect63] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = ('.//pre/span', "'included'") @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect64] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//pre/span[@class='s2']", 'üöä') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect65] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", '^class Foo:\\n pass\\n\\s*$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect66] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", '^ def baz\\(\\):\\n pass\\n\\s*$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect67] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-lines highlight-text notranslate']//pre", '^class Foo:\\n pass\\nclass Bar:\\n$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect68] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-startend highlight-text notranslate']//pre", '^foo = "Including Unicode characters: üöä"\n$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect69] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-preappend highlight-text notranslate']//pre", '(?m)^START CODE$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect70] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", 'def') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect71] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-tab3 highlight-text notranslate']//pre", '-| |-') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[includes.html-expect72] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", '-| |-') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect73] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@id='mod.Cls.meth1']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect74] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@id='errmod.Error']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect75] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = ('.//dt/code', 'long\\(parameter,\\s* list\\)') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect76] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = ('.//dt/code', 'another one') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect77] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#mod.Cls'][@class='reference internal']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect78] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dl[@class='userdesc']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect79] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@id='userdesc-myobj']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect80] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#userdesc-myobj'][@class='reference internal']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect81] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect82] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#Time']", 'Time') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect83] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect84] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//span[@class='pre']", 'CFunction()') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect85] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#c.Sphinx_DoSomething']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect86] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#c.SphinxStruct.member']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect87] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#c.SPHINX_USE_PYTHON']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect88] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#c.SphinxType']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect89] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#c.sphinx_global']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect90] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect91] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect92] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//th[@class='field-name']", 'Field_name:') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect93] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//th[@class='field-name']", 'Field_name all lower:') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect94] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//th[@class='field-name']", 'FIELD_NAME:') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect95] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect96] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//th[@class='field-name']", 'Field_Name:') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect97] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//th[@class='field-name']", 'Field_Name All Word Caps:') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect98] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//th[@class='field-name']", 'Field_name:') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect99] ____________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//th[@class='field-name']", 'Field_name First word cap:') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect100] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//th[@class='field-name']", 'FIELd_name:') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect101] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//th[@class='field-name']", 'FIELd_name PARTial caps:') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect102] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = ('.//h4', 'Custom sidebar') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect103] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//td[@class='field-body']/strong", '^moo$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect104] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//td[@class='field-body']/strong", ) @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect105] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//td[@class='field-body']/ul/li/strong", '^hour$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect106] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//td[@class='field-body']/ul/li/em", '^DuplicateType$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect107] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//td[@class='field-body']/ul/li/em", ) @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect108] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect109] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect110] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect111] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect112] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']/code/span", 'create-auth-token') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect113] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect114] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect115] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect116] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect117] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[objects.html-expect118] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect119] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//meta[@name='hc'][@content='hcval']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect120] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//meta[@name='hc_co'][@content='hcval_co']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect121] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//td[@class='label']", '\\[Ref1\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect122] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//td[@class='label']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect123] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//li[@class='toctree-l1']/a", 'Testing various markup') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect124] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//li[@class='toctree-l2']/a", 'Inline markup') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect125] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = ('.//title', 'Sphinx ') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect126] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//div[@class='footer']", 'Georg Brandl & Team') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect127] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//a[@href='http://python.org/'][@class='reference external']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect128] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//li/a[@href='genindex.html']/span", 'Index') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect129] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//li/a[@href='py-modindex.html']/span", 'Module Index') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect130] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//li/a[@href='search.html']/span", 'Search Page') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect131] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = ('.//h4', 'Contents sidebar') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect132] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//script[@src='file://moo.js']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect133] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect134] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[contents.html-expect135] ___________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[images.html-expect136] ____________________ app = cached_etree_parse = , fname = 'images.html' expect = (".//img[@src='_images/img.png']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[images.html-expect137] ____________________ app = cached_etree_parse = , fname = 'images.html' expect = (".//img[@src='_images/img1.png']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[images.html-expect138] ____________________ app = cached_etree_parse = , fname = 'images.html' expect = (".//img[@src='_images/simg.png']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[images.html-expect139] ____________________ app = cached_etree_parse = , fname = 'images.html' expect = (".//img[@src='_images/svgimg.svg']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html_output[images.html-expect140] ____________________ app = cached_etree_parse = , fname = 'images.html' expect = (".//a[@href='_sources/images.txt']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[otherext.html-expect141] ___________________ app = cached_etree_parse = , fname = 'otherext.html' expect = ('.//h1', 'Generated section') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[otherext.html-expect142] ___________________ app = cached_etree_parse = , fname = 'otherext.html' expect = (".//a[@href='_sources/otherext.foo.txt']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect143] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", '\\[1\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect144] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", '\\[2\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect145] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", '\\[3\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect146] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='reference internal'][@href='#bar'][@id='id4']", '\\[bar\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect147] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", '\\[baz_qux\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect148] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", '\\[4\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect149] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", '\\[5\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect150] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id1']", '\\[1\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect151] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id2']", '\\[2\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect152] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id3']", '\\[3\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect153] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id4']", '\\[bar\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect154] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id5']", '\\[baz_qux\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect155] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id6']", '\\[4\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect156] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id7']", '\\[5\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[footnote.html-expect157] ___________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id8']", '\\[6\\]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _____________________ test_html_output[bom.html-expect158] _____________________ app = cached_etree_parse = , fname = 'bom.html' expect = ('.//title', ' File with UTF-8 BOM') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _______________ test_html_output[subdir/includes.html-expect159] _______________ app = cached_etree_parse = fname = 'subdir/includes.html' expect = (".//a[@class='reference download internal']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _______________ test_html_output[subdir/includes.html-expect160] _______________ app = cached_etree_parse = fname = 'subdir/includes.html' expect = (".//img[@src='../_images/img.png']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _______________ test_html_output[subdir/includes.html-expect161] _______________ app = cached_etree_parse = fname = 'subdir/includes.html', expect = ('.//p', 'This is an include file.') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _______________ test_html_output[subdir/includes.html-expect162] _______________ app = cached_etree_parse = fname = 'subdir/includes.html', expect = ('.//pre/span', 'line 1') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _______________ test_html_output[subdir/includes.html-expect163] _______________ app = cached_etree_parse = fname = 'subdir/includes.html', expect = ('.//pre/span', 'line 2') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ________________ test_html_output[subdir/images.html-expect164] ________________ app = cached_etree_parse = fname = 'subdir/images.html' expect = (".//img[@src='../_images/img1.png']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ________________ test_html_output[subdir/images.html-expect165] ________________ app = cached_etree_parse = fname = 'subdir/images.html' expect = (".//img[@src='../_images/rimg.png']", '') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _________________ test_html_output[extensions.html-expect166] __________________ app = cached_etree_parse = fname = 'extensions.html' expect = (".//a[@href='http://python.org/dev/']", 'http://python.org/dev/') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _________________ test_html_output[extensions.html-expect167] __________________ app = cached_etree_parse = fname = 'extensions.html' expect = (".//a[@href='http://bugs.python.org/issue1000']", 'issue 1000') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _________________ test_html_output[extensions.html-expect168] __________________ app = cached_etree_parse = fname = 'extensions.html' expect = (".//a[@href='http://bugs.python.org/issue1042']", 'explicit caption') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[genindex.html-expect169] ___________________ app = cached_etree_parse = , fname = 'genindex.html' expect = ('.//a/strong', 'Main') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[genindex.html-expect170] ___________________ app = cached_etree_parse = , fname = 'genindex.html' expect = ('.//a/strong', '[1]') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[genindex.html-expect171] ___________________ app = cached_etree_parse = , fname = 'genindex.html' expect = ('.//a/strong', 'Other') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[genindex.html-expect172] ___________________ app = cached_etree_parse = , fname = 'genindex.html' expect = ('.//a', 'entry') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html_output[genindex.html-expect173] ___________________ app = cached_etree_parse = , fname = 'genindex.html' expect = ('.//li/a', 'double') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='first admonition-title']", 'My Admonition'), (".//p[@class='last']", 'Note text.'), (".//p[@class='last']", 'Warning text.'), # inline markup (".//li/strong", r'^command\\n$'), (".//li/strong", r'^program\\n$'), (".//li/em", r'^dfn\\n$'), (".//li/kbd", r'^kbd\\n$'), (".//li/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/code/span[@class='pre']", '^a/$'), (".//li/code/em/span[@class='pre']", '^varpart$'), (".//li/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference']", r'\[1\]'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='first admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), # tests for smartypants (".//li", u'Smart “quotes” in English ‘text’.'), (".//li", u'Smart — long and – short dashes.'), (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name all lower:'), (".//th[@class='field-name']", 'FIELD_NAME:'), (".//th[@class='field-name']", 'FIELD_NAME ALL CAPS:'), (".//th[@class='field-name']", 'Field_Name:'), (".//th[@class='field-name']", 'Field_Name All Word Caps:'), (".//th[@class='field-name']", 'Field_name:'), (".//th[@class='field-name']", 'Field_name First word cap:'), (".//th[@class='field-name']", 'FIELd_name:'), (".//th[@class='field-name']", 'FIELd_name PARTial caps:'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//td[@class='field-body']/strong", '^moo$'), (".//td[@class='field-body']/strong", tail_check(r'\(Moo\) .* Moo')), (".//td[@class='field-body']/ul/li/strong", '^hour$'), (".//td[@class='field-body']/ul/li/em", '^DuplicateType$'), (".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//td[@class='label']", r'\[Ref1\]'), (".//td[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/a[@href='genindex.html']/span", 'Index'), (".//li/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"), (".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"), (".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"), (".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"), (".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"), (".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"), (".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"), (".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"), (".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"), (".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"), (".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ______________________________ test_html_download ______________________________ app = @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co'}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_download(app): > app.build() tests/test_build_html.py:427: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _____________________________ test_html_translator _____________________________ app = @pytest.mark.sphinx('html', testroot='build-html-translator') def test_html_translator(app): > app.build() tests/test_build_html.py:450: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/build-html-translator # outdir: /<>/tests/build/build-html-translator/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[baz.html-expect0] ________________________ app = cached_etree_parse = , fname = 'baz.html' expect = ('.//h1', '2.1.1. Baz A', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________ test_tocdepth[index.html-expect1] _______________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________ test_tocdepth[index.html-expect2] _______________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________ test_tocdepth[index.html-expect3] _______________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________ test_tocdepth[index.html-expect4] _______________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[bar.html-expect5] ________________________ app = cached_etree_parse = , fname = 'bar.html' expect = ('.//h1', '2. Bar', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[bar.html-expect6] ________________________ app = cached_etree_parse = , fname = 'bar.html' expect = ('.//h2', '2.1. Bar A', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[bar.html-expect7] ________________________ app = cached_etree_parse = , fname = 'bar.html' expect = ('.//h2', '2.2. Bar B', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[bar.html-expect8] ________________________ app = cached_etree_parse = , fname = 'bar.html' expect = ('.//h3', '2.2.1. Bar B1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[bar.html-expect9] ________________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[bar.html-expect10] _______________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[bar.html-expect11] _______________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[bar.html-expect12] _______________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[foo.html-expect13] _______________________ app = cached_etree_parse = , fname = 'foo.html' expect = ('.//h1', '1. Foo', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[foo.html-expect14] _______________________ app = cached_etree_parse = , fname = 'foo.html' expect = ('.//h2', '1.1. Foo A', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[foo.html-expect15] _______________________ app = cached_etree_parse = , fname = 'foo.html' expect = ('.//h3', '1.1.1. Foo A1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[foo.html-expect16] _______________________ app = cached_etree_parse = , fname = 'foo.html' expect = ('.//h2', '1.2. Foo B', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[foo.html-expect17] _______________________ app = cached_etree_parse = , fname = 'foo.html' expect = ('.//h3', '1.2.1. Foo B1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[foo.html-expect18] _______________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[foo.html-expect19] _______________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[foo.html-expect20] _______________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_tocdepth[foo.html-expect21] _______________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), ], 'foo.html': [ (".//h1", '1. Foo', True), (".//h2", '1.1. Foo A', True), (".//h3", '1.1.1. Foo A1', True), (".//h2", '1.2. Foo B', True), (".//h3", '1.2.1. Foo B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1. Foo A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.1.1. Foo A1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2. Foo B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '1.2.1. Foo B1', True), ], 'bar.html': [ (".//h1", '2. Bar', True), (".//h2", '2.1. Bar A', True), (".//h2", '2.2. Bar B', True), (".//h3", '2.2.1. Bar B1', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2. Bar', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.1. Bar A', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2. Bar B', True), (".//div[@class='sphinxsidebarwrapper']//li/a", '2.2.1. Bar B1', False), ], 'baz.html': [ (".//h1", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('html', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_tocdepth_singlehtml[index.html-expect0] _________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186346.019256, 'baz': 1562186346.024073, 'foo': 1562186346.032506, 'index': 1562186346.038897} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _________________ test_tocdepth_singlehtml[index.html-expect1] _________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186346.202807, 'baz': 1562186346.207504, 'foo': 1562186346.215673, 'index': 1562186346.222677} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _________________ test_tocdepth_singlehtml[index.html-expect2] _________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186346.491158, 'baz': 1562186346.496049, 'foo': 1562186346.503094, 'index': 1562186346.510047} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _________________ test_tocdepth_singlehtml[index.html-expect3] _________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186346.672992, 'baz': 1562186346.677696, 'foo': 1562186346.685007, 'index': 1562186346.691284} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _________________ test_tocdepth_singlehtml[index.html-expect4] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//h1', 'test-tocdepth', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186346.942985, 'baz': 1562186346.947856, 'foo': 1562186346.954926, 'index': 1562186346.961671} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _________________ test_tocdepth_singlehtml[index.html-expect5] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//h2', '1. Foo', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186347.125687, 'baz': 1562186347.130404, 'foo': 1562186347.137524, 'index': 1562186347.144562} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _________________ test_tocdepth_singlehtml[index.html-expect6] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//h3', '1.1. Foo A', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186347.307866, 'baz': 1562186347.31263, 'foo': 1562186347.319615, 'index': 1562186347.326001} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _________________ test_tocdepth_singlehtml[index.html-expect7] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//h4', '1.1.1. Foo A1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186347.582098, 'baz': 1562186347.586931, 'foo': 1562186347.594083, 'index': 1562186347.600683} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _________________ test_tocdepth_singlehtml[index.html-expect8] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//h3', '1.2. Foo B', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186347.765741, 'baz': 1562186347.770643, 'foo': 1562186347.777762, 'index': 1562186347.785827} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _________________ test_tocdepth_singlehtml[index.html-expect9] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//h4', '1.2.1. Foo B1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186348.041944, 'baz': 1562186348.046856, 'foo': 1562186348.055343, 'index': 1562186348.061822} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: ________________ test_tocdepth_singlehtml[index.html-expect10] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//h2', '2. Bar', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186348.224814, 'baz': 1562186348.229541, 'foo': 1562186348.237709, 'index': 1562186348.244044} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: ________________ test_tocdepth_singlehtml[index.html-expect11] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//h3', '2.1. Bar A', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186348.504019, 'baz': 1562186348.508918, 'foo': 1562186348.516039, 'index': 1562186348.522294} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: ________________ test_tocdepth_singlehtml[index.html-expect12] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//h3', '2.2. Bar B', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186348.685797, 'baz': 1562186348.690484, 'foo': 1562186348.697776, 'index': 1562186348.704064} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: ________________ test_tocdepth_singlehtml[index.html-expect13] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//h4', '2.2.1. Bar B1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186348.96834, 'baz': 1562186348.973261, 'foo': 1562186348.980796, 'index': 1562186348.987783} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: ________________ test_tocdepth_singlehtml[index.html-expect14] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//h4', '2.1.1. Baz A', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//li[@class='toctree-l3']/a", '1.1.1. Foo A1', True), (".//li[@class='toctree-l3']/a", '1.2.1. Foo B1', True), (".//li[@class='toctree-l3']/a", '2.1.1. Bar A1', False), (".//li[@class='toctree-l3']/a", '2.2.1. Bar B1', False), # index.rst (".//h1", 'test-tocdepth', True), # foo.rst (".//h2", '1. Foo', True), (".//h3", '1.1. Foo A', True), (".//h4", '1.1.1. Foo A1', True), (".//h3", '1.2. Foo B', True), (".//h4", '1.2.1. Foo B1', True), # bar.rst (".//h2", '2. Bar', True), (".//h3", '2.1. Bar A', True), (".//h3", '2.2. Bar B', True), (".//h4", '2.2.1. Bar B1', True), # baz.rst (".//h4", '2.1.1. Baz A', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.test_params(shared_result='test_build_html_tocdepth') def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186349.15158, 'baz': 1562186349.156355, 'foo': 1562186349.163342, 'index': 1562186349.169947} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_tocdepth # outdir: /<>/tests/build/test_build_html_tocdepth/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: __________________________ test_numfig_disabled_warn ___________________________ app = warning = @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled_warn(app, warning): > app.build() tests/test_build_html.py:531: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________________ test_numfig_disabled[baz.html-expect0] ____________________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________________ test_numfig_disabled[baz.html-expect1] ____________________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//table/caption/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________________ test_numfig_disabled[baz.html-expect2] ____________________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[index.html-expect3] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[index.html-expect4] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[index.html-expect5] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[index.html-expect6] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/code/span', '^fig1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[index.html-expect7] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/code/span', '^Figure%s$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[index.html-expect8] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/code/span', '^table-1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[index.html-expect9] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/code/span', '^Table:%s$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_disabled[index.html-expect10] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/code/span', '^CODE_1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_disabled[index.html-expect11] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/code/span', '^Code-%s$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_disabled[index.html-expect12] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Section 1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_disabled[index.html-expect13] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Section 2.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_disabled[index.html-expect14] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/code/span', '^Fig.{number}$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_disabled[index.html-expect15] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Sect.1 Foo$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[bar.html-expect16] ____________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[bar.html-expect17] ____________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[bar.html-expect18] ____________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[foo.html-expect19] ____________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[foo.html-expect20] ____________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_numfig_disabled[foo.html-expect21] ____________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", None, True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), (".//li/code/span", '^fig1$', True), (".//li/code/span", '^Figure%s$', True), (".//li/code/span", '^table-1$', True), (".//li/code/span", '^Table:%s$', True), (".//li/code/span", '^CODE_1$', True), (".//li/code/span", '^Code-%s$', True), (".//li/a/span", '^Section 1$', True), (".//li/a/span", '^Section 2.1$', True), (".//li/code/span", '^Fig.{number}$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", None, True), (".//table/caption/span[@class='caption-number']", None, True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", None, True), ], })) @pytest.mark.sphinx('html', testroot='numfig') @pytest.mark.test_params(shared_result='test_build_html_numfig') def test_numfig_disabled(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig # outdir: /<>/tests/build/test_build_html_numfig/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_without_numbered_toctree_warn ___________________ app = warning = @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree_warn', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree_warn(app, warning): > app.build() tests/test_build_html.py:590: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree_warn # outdir: /<>/tests/build/test_numfig_without_numbered_toctree_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_without_numbered_toctree[baz.html-expect0] ____________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 6 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ____________ test_numfig_without_numbered_toctree[baz.html-expect1] ____________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 6 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ____________ test_numfig_without_numbered_toctree[baz.html-expect2] ____________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 6 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[index.html-expect3] ___________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 9 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[index.html-expect4] ___________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 10 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[index.html-expect5] ___________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 9 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[index.html-expect6] ___________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 10 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[index.html-expect7] ___________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 9 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[index.html-expect8] ___________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 10 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[index.html-expect9] ___________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Fig. 9$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: __________ test_numfig_without_numbered_toctree[index.html-expect10] ___________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Figure6$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: __________ test_numfig_without_numbered_toctree[index.html-expect11] ___________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Table 9$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: __________ test_numfig_without_numbered_toctree[index.html-expect12] ___________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Table:6$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: __________ test_numfig_without_numbered_toctree[index.html-expect13] ___________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Listing 9$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: __________ test_numfig_without_numbered_toctree[index.html-expect14] ___________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Code-6$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: __________ test_numfig_without_numbered_toctree[index.html-expect15] ___________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/code/span', '^foo$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: __________ test_numfig_without_numbered_toctree[index.html-expect16] ___________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/code/span', '^bar_a$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: __________ test_numfig_without_numbered_toctree[index.html-expect17] ___________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Fig.9 should be Fig.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: __________ test_numfig_without_numbered_toctree[index.html-expect18] ___________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/code/span', '^Sect.{number}$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[bar.html-expect19] ____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 5 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[bar.html-expect20] ____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 7 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[bar.html-expect21] ____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 8 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[bar.html-expect22] ____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 5 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[bar.html-expect23] ____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 7 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[bar.html-expect24] ____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 8 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[bar.html-expect25] ____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 5 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[bar.html-expect26] ____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 7 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[bar.html-expect27] ____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 8 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect28] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect29] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect30] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect31] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect32] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect33] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect34] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect35] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect36] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect37] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect38] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ___________ test_numfig_without_numbered_toctree[foo.html-expect39] ____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 9 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 10 $', True), (".//table/caption/span[@class='caption-number']", '^Table 9 $', True), (".//table/caption/span[@class='caption-number']", '^Table 10 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 9 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 10 $', True), (".//li/a/span", '^Fig. 9$', True), (".//li/a/span", '^Figure6$', True), (".//li/a/span", '^Table 9$', True), (".//li/a/span", '^Table:6$', True), (".//li/a/span", '^Listing 9$', True), (".//li/a/span", '^Code-6$', True), (".//li/code/span", '^foo$', True), (".//li/code/span", '^bar_a$', True), (".//li/a/span", '^Fig.9 should be Fig.1$', True), (".//li/code/span", '^Sect.{number}$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 5 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 7 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 8 $', True), (".//table/caption/span[@class='caption-number']", '^Table 5 $', True), (".//table/caption/span[@class='caption-number']", '^Table 7 $', True), (".//table/caption/span[@class='caption-number']", '^Table 8 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 5 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 7 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 8 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 6 $', True), (".//table/caption/span[@class='caption-number']", '^Table 6 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 6 $', True), ], })) @pytest.mark.sphinx( 'html', testroot='numfig', srcdir='test_numfig_without_numbered_toctree', confoverrides={'numfig': True}) def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect): # remove :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_build_html.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_numfig_without_numbered_toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_numfig_without_numbered_toctree # outdir: /<>/tests/build/test_numfig_without_numbered_toctree/_build/html # status: Running Sphinx v1.8.5 # warning: ____________________ test_numfig_with_numbered_toctree_warn ____________________ app = warning = @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree_warn(app, warning): > app.build() tests/test_build_html.py:702: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[baz.html-expect0] ______________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[baz.html-expect1] ______________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[baz.html-expect2] ______________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect3] _____________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect4] _____________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect5] _____________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect6] _____________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect7] _____________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect8] _____________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect9] _____________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Fig. 1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect10] ____________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Figure2.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect11] ____________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Table 1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect12] ____________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Table:2.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect13] ____________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Listing 1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect14] ____________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Code-2.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect15] ____________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Section.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect16] ____________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Section.2.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect17] ____________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Fig.1 should be Fig.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________ test_numfig_with_numbered_toctree[index.html-expect18] ____________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Sect.1 Foo$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[bar.html-expect19] _____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[bar.html-expect20] _____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[bar.html-expect21] _____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[bar.html-expect22] _____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[bar.html-expect23] _____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[bar.html-expect24] _____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[bar.html-expect25] _____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[bar.html-expect26] _____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[bar.html-expect27] _____________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect28] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect29] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect30] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect31] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect32] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect33] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect34] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect35] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect36] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect37] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect38] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________ test_numfig_with_numbered_toctree[foo.html-expect39] _____________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________________ test_numfig_with_prefix_warn _________________________ app = warning = @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix_warn(app, warning): > app.build() tests/test_build_html.py:805: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[baz.html-expect0] ___________________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Figure:2.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[baz.html-expect1] ___________________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[baz.html-expect2] ___________________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Code-2.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect3] __________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Figure:1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect4] __________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Figure:2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect5] __________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect6] __________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect7] __________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Code-1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect8] __________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Code-2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect9] __________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Figure:1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect10] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Figure2.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect11] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Tab_1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect12] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Table:2.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect13] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Code-1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect14] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Code-2.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect15] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^SECTION-1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect16] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^SECTION-2.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect17] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Fig.1 should be Fig.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_numfig_with_prefix[index.html-expect18] _________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Sect.1 Foo$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[bar.html-expect19] __________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Figure:2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[bar.html-expect20] __________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Figure:2.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[bar.html-expect21] __________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Figure:2.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[bar.html-expect22] __________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[bar.html-expect23] __________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[bar.html-expect24] __________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[bar.html-expect25] __________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Code-2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[bar.html-expect26] __________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Code-2.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[bar.html-expect27] __________________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Code-2.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect28] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Figure:1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect29] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Figure:1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect30] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Figure:1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect31] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Figure:1.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect32] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect33] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect34] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect35] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect36] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Code-1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect37] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Code-1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect38] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Code-1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_numfig_with_prefix[foo.html-expect39] __________________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Code-1.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2 $', True), (".//li/a/span", '^Figure:1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Tab_1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Code-1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^SECTION-1$', True), (".//li/a/span", '^SECTION-2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-1.4 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.4 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Figure:2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Tab_2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Code-2.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) @pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn') def test_numfig_with_prefix(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:901: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_format_warn # outdir: /<>/tests/build/test_build_html_numfig_format_warn/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________ test_numfig_with_secnum_depth_warn ______________________ app = warning = @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth_warn(app, warning): > app.build() tests/test_build_html.py:909: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[baz.html-expect0] ________________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[baz.html-expect1] ________________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[baz.html-expect2] ________________ app = cached_etree_parse = , fname = 'baz.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect3] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect4] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect5] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect6] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect7] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect8] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect9] _______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Fig. 1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect10] ______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Figure2.1.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect11] ______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Table 1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect12] ______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Table:2.1.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect13] ______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Listing 1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect14] ______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Code-2.1.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect15] ______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Section.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect16] ______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Section.2.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect17] ______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Fig.1 should be Fig.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________ test_numfig_with_secnum_depth[index.html-expect18] ______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Sect.1 Foo$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[bar.html-expect19] _______________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[bar.html-expect20] _______________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[bar.html-expect21] _______________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[bar.html-expect22] _______________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[bar.html-expect23] _______________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[bar.html-expect24] _______________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[bar.html-expect25] _______________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[bar.html-expect26] _______________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[bar.html-expect27] _______________ app = cached_etree_parse = , fname = 'bar.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect28] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect29] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect30] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect31] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect32] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect33] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect34] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect35] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect36] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect37] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect38] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_secnum_depth[foo.html-expect39] _______________ app = cached_etree_parse = , fname = 'foo.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.1.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.1.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.1.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), ], 'foo.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2.1 $', True), ], 'bar.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2.1 $', True), ], 'baz.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1.2 $', True), ], })) @pytest.mark.sphinx('html', testroot='numfig', confoverrides={ 'numfig': True, 'numfig_secnum_depth': 2}) @pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2') def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1001: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'baz', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_numfig_depth_2 # outdir: /<>/tests/build/test_build_html_numfig_depth_2/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect0] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186396.035666, 'baz': 1562186396.052504, 'foo': 1562186396.08245, 'index': 1562186396.111267} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect1] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186396.425044, 'baz': 1562186396.441861, 'foo': 1562186396.471334, 'index': 1562186396.500024} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect2] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186396.688562, 'baz': 1562186396.702275, 'foo': 1562186396.731824, 'index': 1562186396.76086} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect3] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186397.071246, 'baz': 1562186397.085854, 'foo': 1562186397.115952, 'index': 1562186397.143446} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect4] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186397.343434, 'baz': 1562186397.358341, 'foo': 1562186397.386879, 'index': 1562186397.520647} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect5] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186397.707892, 'baz': 1562186397.723729, 'foo': 1562186397.751732, 'index': 1562186397.779966} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect6] ________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Fig. 1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186398.081446, 'baz': 1562186398.097538, 'foo': 1562186398.125423, 'index': 1562186398.154902} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect7] ________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Figure2.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186398.340866, 'baz': 1562186398.355262, 'foo': 1562186398.385078, 'index': 1562186398.411892} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect8] ________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Table 1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186398.708493, 'baz': 1562186398.722833, 'foo': 1562186398.75304, 'index': 1562186398.779361} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect9] ________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Table:2.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186399.070392, 'baz': 1562186399.084662, 'foo': 1562186399.114582, 'index': 1562186399.142565} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect10] _______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Listing 1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186399.330118, 'baz': 1562186399.345065, 'foo': 1562186399.373375, 'index': 1562186399.401659} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect11] _______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Code-2.2$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186399.700175, 'baz': 1562186399.716536, 'foo': 1562186399.744721, 'index': 1562186399.77358} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect12] _______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Section.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186399.960568, 'baz': 1562186399.974269, 'foo': 1562186400.004516, 'index': 1562186400.030959} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect13] _______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Section.2.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186400.323975, 'baz': 1562186400.338033, 'foo': 1562186400.367704, 'index': 1562186400.395052} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect14] _______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Fig.1 should be Fig.1$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186400.703481, 'baz': 1562186400.718189, 'foo': 1562186400.747511, 'index': 1562186400.774273} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect15] _______________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', '^Sect.1 Foo$', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186400.960615, 'baz': 1562186400.975739, 'foo': 1562186401.003563, 'index': 1562186401.031787} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect16] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186401.329443, 'baz': 1562186401.344859, 'foo': 1562186401.373605, 'index': 1562186401.402096} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect17] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186401.592169, 'baz': 1562186401.606205, 'foo': 1562186401.739488, 'index': 1562186401.766532} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect18] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186401.954417, 'baz': 1562186401.968387, 'foo': 1562186401.99852, 'index': 1562186402.024991} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect19] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 1.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186402.328608, 'baz': 1562186402.343764, 'foo': 1562186402.373025, 'index': 1562186402.40038} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect20] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186402.588288, 'baz': 1562186402.602075, 'foo': 1562186402.630735, 'index': 1562186402.659913} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect21] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186402.956804, 'baz': 1562186402.972361, 'foo': 1562186403.000676, 'index': 1562186403.029507} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect22] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186403.338355, 'baz': 1562186403.353811, 'foo': 1562186403.382285, 'index': 1562186403.412088} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect23] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186403.598155, 'baz': 1562186403.612044, 'foo': 1562186403.642401, 'index': 1562186403.668665} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect24] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186403.9718, 'baz': 1562186403.986256, 'foo': 1562186404.016566, 'index': 1562186404.044956} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect25] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186404.23241, 'baz': 1562186404.246288, 'foo': 1562186404.27412, 'index': 1562186404.408579} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect26] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186404.597444, 'baz': 1562186404.612418, 'foo': 1562186404.641706, 'index': 1562186404.670963} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect27] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 1.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186404.975684, 'baz': 1562186404.991001, 'foo': 1562186405.01967, 'index': 1562186405.049184} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect28] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186405.236352, 'baz': 1562186405.250071, 'foo': 1562186405.280356, 'index': 1562186405.306731} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect29] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186405.604679, 'baz': 1562186405.618686, 'foo': 1562186405.648467, 'index': 1562186405.675257} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect30] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186405.967414, 'baz': 1562186405.981746, 'foo': 1562186406.010465, 'index': 1562186406.037476} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect31] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186406.227546, 'baz': 1562186406.242678, 'foo': 1562186406.271195, 'index': 1562186406.300241} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect32] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186406.600008, 'baz': 1562186406.615996, 'foo': 1562186406.645288, 'index': 1562186406.673835} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect33] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186406.86043, 'baz': 1562186406.874179, 'foo': 1562186406.904474, 'index': 1562186406.931357} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect34] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.1 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186407.225692, 'baz': 1562186407.240811, 'foo': 1562186407.270633, 'index': 1562186407.297323} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect35] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.3 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186407.605555, 'baz': 1562186407.619814, 'foo': 1562186407.649658, 'index': 1562186407.676404} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect36] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.4 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186407.862694, 'baz': 1562186407.87754, 'foo': 1562186407.906624, 'index': 1562186407.935449} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect37] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", '^Fig. 2.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186408.234221, 'baz': 1562186408.251762, 'foo': 1562186408.279871, 'index': 1562186408.30887} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect38] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186408.495216, 'baz': 1562186408.508768, 'foo': 1562186408.644355, 'index': 1562186408.671089} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: _______________ test_numfig_with_singlehtml[index.html-expect39] _______________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='code-block-caption']/span[@class='caption-number']", '^Listing 2.2 $', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2 $', True), (".//li/a/span", '^Fig. 1$', True), (".//li/a/span", '^Figure2.2$', True), (".//li/a/span", '^Table 1$', True), (".//li/a/span", '^Table:2.2$', True), (".//li/a/span", '^Listing 1$', True), (".//li/a/span", '^Code-2.2$', True), (".//li/a/span", '^Section.1$', True), (".//li/a/span", '^Section.2.1$', True), (".//li/a/span", '^Fig.1 should be Fig.1$', True), (".//li/a/span", '^Sect.1 Foo$', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.2 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 1.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 1.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 1.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.1 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.3 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.4 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.1 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.3 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.4 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.1 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.3 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.4 $', True), (".//div[@class='figure']/p[@class='caption']/" "span[@class='caption-number']", '^Fig. 2.2 $', True), (".//table/caption/span[@class='caption-number']", '^Table 2.2 $', True), (".//div[@class='code-block-caption']/" "span[@class='caption-number']", '^Listing 2.2 $', True), ], })) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={ 'numfig': True}) @pytest.mark.test_params(shared_result='test_build_html_numfig_on') def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1083: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'bar': 1562186408.860684, 'baz': 1562186408.874716, 'foo': 1562186408.904209, 'index': 1562186408.931045} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/test_build_html_numfig_on # outdir: /<>/tests/build/test_build_html_numfig_on/_build/singlehtml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [singlehtml]: all documents updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... ing documents...  # warning: ___________________ test_enumerable_node[index.html-expect0] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", 'Fig. 1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 1", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 2", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 3", True), (".//div//span[@class='caption-number']", "No.1 ", True), (".//div//span[@class='caption-number']", "No.2 ", True), (".//li/a/span", 'Fig. 1', True), (".//li/a/span", 'Fig. 2', True), (".//li/a/span", 'Fig. 3', True), (".//li/a/span", 'No.1', True), (".//li/a/span", 'No.2', True), ], })) @pytest.mark.sphinx( 'html', testroot='add_enumerable_node', srcdir='test_enumerable_node', ) def test_enumerable_node(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_enumerable_node # outdir: /<>/tests/build/test_enumerable_node/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_enumerable_node[index.html-expect1] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", 'Fig. 2', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 1", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 2", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 3", True), (".//div//span[@class='caption-number']", "No.1 ", True), (".//div//span[@class='caption-number']", "No.2 ", True), (".//li/a/span", 'Fig. 1', True), (".//li/a/span", 'Fig. 2', True), (".//li/a/span", 'Fig. 3', True), (".//li/a/span", 'No.1', True), (".//li/a/span", 'No.2', True), ], })) @pytest.mark.sphinx( 'html', testroot='add_enumerable_node', srcdir='test_enumerable_node', ) def test_enumerable_node(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_enumerable_node # outdir: /<>/tests/build/test_enumerable_node/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_enumerable_node[index.html-expect2] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", 'Fig. 3', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 1", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 2", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 3", True), (".//div//span[@class='caption-number']", "No.1 ", True), (".//div//span[@class='caption-number']", "No.2 ", True), (".//li/a/span", 'Fig. 1', True), (".//li/a/span", 'Fig. 2', True), (".//li/a/span", 'Fig. 3', True), (".//li/a/span", 'No.1', True), (".//li/a/span", 'No.2', True), ], })) @pytest.mark.sphinx( 'html', testroot='add_enumerable_node', srcdir='test_enumerable_node', ) def test_enumerable_node(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_enumerable_node # outdir: /<>/tests/build/test_enumerable_node/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_enumerable_node[index.html-expect3] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div//span[@class='caption-number']", 'No.1 ', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 1", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 2", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 3", True), (".//div//span[@class='caption-number']", "No.1 ", True), (".//div//span[@class='caption-number']", "No.2 ", True), (".//li/a/span", 'Fig. 1', True), (".//li/a/span", 'Fig. 2', True), (".//li/a/span", 'Fig. 3', True), (".//li/a/span", 'No.1', True), (".//li/a/span", 'No.2', True), ], })) @pytest.mark.sphinx( 'html', testroot='add_enumerable_node', srcdir='test_enumerable_node', ) def test_enumerable_node(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_enumerable_node # outdir: /<>/tests/build/test_enumerable_node/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_enumerable_node[index.html-expect4] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//div//span[@class='caption-number']", 'No.2 ', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 1", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 2", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 3", True), (".//div//span[@class='caption-number']", "No.1 ", True), (".//div//span[@class='caption-number']", "No.2 ", True), (".//li/a/span", 'Fig. 1', True), (".//li/a/span", 'Fig. 2', True), (".//li/a/span", 'Fig. 3', True), (".//li/a/span", 'No.1', True), (".//li/a/span", 'No.2', True), ], })) @pytest.mark.sphinx( 'html', testroot='add_enumerable_node', srcdir='test_enumerable_node', ) def test_enumerable_node(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_enumerable_node # outdir: /<>/tests/build/test_enumerable_node/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_enumerable_node[index.html-expect5] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', 'Fig. 1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 1", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 2", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 3", True), (".//div//span[@class='caption-number']", "No.1 ", True), (".//div//span[@class='caption-number']", "No.2 ", True), (".//li/a/span", 'Fig. 1', True), (".//li/a/span", 'Fig. 2', True), (".//li/a/span", 'Fig. 3', True), (".//li/a/span", 'No.1', True), (".//li/a/span", 'No.2', True), ], })) @pytest.mark.sphinx( 'html', testroot='add_enumerable_node', srcdir='test_enumerable_node', ) def test_enumerable_node(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_enumerable_node # outdir: /<>/tests/build/test_enumerable_node/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_enumerable_node[index.html-expect6] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', 'Fig. 2', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 1", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 2", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 3", True), (".//div//span[@class='caption-number']", "No.1 ", True), (".//div//span[@class='caption-number']", "No.2 ", True), (".//li/a/span", 'Fig. 1', True), (".//li/a/span", 'Fig. 2', True), (".//li/a/span", 'Fig. 3', True), (".//li/a/span", 'No.1', True), (".//li/a/span", 'No.2', True), ], })) @pytest.mark.sphinx( 'html', testroot='add_enumerable_node', srcdir='test_enumerable_node', ) def test_enumerable_node(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_enumerable_node # outdir: /<>/tests/build/test_enumerable_node/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_enumerable_node[index.html-expect7] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', 'Fig. 3', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 1", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 2", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 3", True), (".//div//span[@class='caption-number']", "No.1 ", True), (".//div//span[@class='caption-number']", "No.2 ", True), (".//li/a/span", 'Fig. 1', True), (".//li/a/span", 'Fig. 2', True), (".//li/a/span", 'Fig. 3', True), (".//li/a/span", 'No.1', True), (".//li/a/span", 'No.2', True), ], })) @pytest.mark.sphinx( 'html', testroot='add_enumerable_node', srcdir='test_enumerable_node', ) def test_enumerable_node(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_enumerable_node # outdir: /<>/tests/build/test_enumerable_node/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_enumerable_node[index.html-expect8] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', 'No.1', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 1", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 2", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 3", True), (".//div//span[@class='caption-number']", "No.1 ", True), (".//div//span[@class='caption-number']", "No.2 ", True), (".//li/a/span", 'Fig. 1', True), (".//li/a/span", 'Fig. 2', True), (".//li/a/span", 'Fig. 3', True), (".//li/a/span", 'No.1', True), (".//li/a/span", 'No.2', True), ], })) @pytest.mark.sphinx( 'html', testroot='add_enumerable_node', srcdir='test_enumerable_node', ) def test_enumerable_node(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_enumerable_node # outdir: /<>/tests/build/test_enumerable_node/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________ test_enumerable_node[index.html-expect9] ___________________ app = cached_etree_parse = , fname = 'index.html' expect = ('.//li/a/span', 'No.2', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 1", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 2", True), (".//div[@class='figure']/p[@class='caption']/span[@class='caption-number']", "Fig. 3", True), (".//div//span[@class='caption-number']", "No.1 ", True), (".//div//span[@class='caption-number']", "No.2 ", True), (".//li/a/span", 'Fig. 1', True), (".//li/a/span", 'Fig. 2', True), (".//li/a/span", 'Fig. 3', True), (".//li/a/span", 'No.1', True), (".//li/a/span", 'No.2', True), ], })) @pytest.mark.sphinx( 'html', testroot='add_enumerable_node', srcdir='test_enumerable_node', ) def test_enumerable_node(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_enumerable_node # outdir: /<>/tests/build/test_enumerable_node/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________________ test_html_assets _______________________________ app = @pytest.mark.sphinx('html', testroot='html_assets') def test_html_assets(app): > app.builder.build_all() tests/test_build_html.py:1115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/html_assets # outdir: /<>/tests/build/html_assets/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________________________ test_html_copy_source _____________________________ app = @pytest.mark.sphinx('html', testroot='basic', confoverrides={'html_copy_source': False}) def test_html_copy_source(app): > app.builder.build_all() tests/test_build_html.py:1159: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________________ test_html_sourcelink_suffix __________________________ app = @pytest.mark.sphinx('html', testroot='basic', confoverrides={'html_sourcelink_suffix': '.txt'}) def test_html_sourcelink_suffix(app): > app.builder.build_all() tests/test_build_html.py:1165: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: _______________________ test_html_sourcelink_suffix_same _______________________ app = @pytest.mark.sphinx('html', testroot='basic', confoverrides={'html_sourcelink_suffix': '.rst'}) def test_html_sourcelink_suffix_same(app): > app.builder.build_all() tests/test_build_html.py:1171: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: ______________________ test_html_sourcelink_suffix_empty _______________________ app = @pytest.mark.sphinx('html', testroot='basic', confoverrides={'html_sourcelink_suffix': ''}) def test_html_sourcelink_suffix_empty(app): > app.builder.build_all() tests/test_build_html.py:1177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: _______________________________ test_html_entity _______________________________ app = @pytest.mark.sphinx('html', testroot='html_entity') def test_html_entity(app): > app.builder.build_all() tests/test_build_html.py:1183: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/html_entity # outdir: /<>/tests/build/html_entity/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/html_entity/index.rst:9: WARNING: Error in "list-table" directive: invalid option block. .. list-table:: :header-rows: 1 - * un * * trois _____________________________ test_html_inventory ______________________________ app = @pytest.mark.sphinx('html', testroot='basic') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_html_inventory(app): > app.builder.build_all() tests/test_build_html.py:1193: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: ___________________________ test_html_raw_directive ____________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='directives-raw') def test_html_raw_directive(app, status, warning): > app.builder.build_all() tests/test_build_html.py:1219: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/directives-raw # outdir: /<>/tests/build/directives-raw/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ________________ test_alternate_stylesheets[index.html-expect0] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//link[@href='_static/persistent.css'][@rel='stylesheet']", '', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//link[@href='_static/persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/alternate2.css']" "[@rel='alternate stylesheet']", '', True), (".//link[@href='_static/more_persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/more_default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/more_alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/more_alternate2.css']" "[@rel='alternate stylesheet']", '', True), ], })) @pytest.mark.sphinx('html', testroot='stylesheets') def test_alternate_stylesheets(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/stylesheets # outdir: /<>/tests/build/stylesheets/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ________________ test_alternate_stylesheets[index.html-expect1] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//link[@href='_static/default.css'][@rel='stylesheet'][@title='Default']", '', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//link[@href='_static/persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/alternate2.css']" "[@rel='alternate stylesheet']", '', True), (".//link[@href='_static/more_persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/more_default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/more_alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/more_alternate2.css']" "[@rel='alternate stylesheet']", '', True), ], })) @pytest.mark.sphinx('html', testroot='stylesheets') def test_alternate_stylesheets(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/stylesheets # outdir: /<>/tests/build/stylesheets/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ________________ test_alternate_stylesheets[index.html-expect2] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//link[@href='_static/alternate1.css'][@rel='alternate stylesheet'][@title='Alternate']", '', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//link[@href='_static/persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/alternate2.css']" "[@rel='alternate stylesheet']", '', True), (".//link[@href='_static/more_persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/more_default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/more_alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/more_alternate2.css']" "[@rel='alternate stylesheet']", '', True), ], })) @pytest.mark.sphinx('html', testroot='stylesheets') def test_alternate_stylesheets(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/stylesheets # outdir: /<>/tests/build/stylesheets/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ________________ test_alternate_stylesheets[index.html-expect3] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//link[@href='_static/alternate2.css'][@rel='alternate stylesheet']", '', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//link[@href='_static/persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/alternate2.css']" "[@rel='alternate stylesheet']", '', True), (".//link[@href='_static/more_persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/more_default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/more_alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/more_alternate2.css']" "[@rel='alternate stylesheet']", '', True), ], })) @pytest.mark.sphinx('html', testroot='stylesheets') def test_alternate_stylesheets(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/stylesheets # outdir: /<>/tests/build/stylesheets/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ________________ test_alternate_stylesheets[index.html-expect4] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//link[@href='_static/more_persistent.css'][@rel='stylesheet']", '', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//link[@href='_static/persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/alternate2.css']" "[@rel='alternate stylesheet']", '', True), (".//link[@href='_static/more_persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/more_default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/more_alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/more_alternate2.css']" "[@rel='alternate stylesheet']", '', True), ], })) @pytest.mark.sphinx('html', testroot='stylesheets') def test_alternate_stylesheets(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/stylesheets # outdir: /<>/tests/build/stylesheets/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ________________ test_alternate_stylesheets[index.html-expect5] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//link[@href='_static/more_default.css'][@rel='stylesheet'][@title='Default']", '', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//link[@href='_static/persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/alternate2.css']" "[@rel='alternate stylesheet']", '', True), (".//link[@href='_static/more_persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/more_default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/more_alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/more_alternate2.css']" "[@rel='alternate stylesheet']", '', True), ], })) @pytest.mark.sphinx('html', testroot='stylesheets') def test_alternate_stylesheets(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/stylesheets # outdir: /<>/tests/build/stylesheets/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ________________ test_alternate_stylesheets[index.html-expect6] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//link[@href='_static/more_alternate1.css'][@rel='alternate stylesheet'][@title='Alternate']", '', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//link[@href='_static/persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/alternate2.css']" "[@rel='alternate stylesheet']", '', True), (".//link[@href='_static/more_persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/more_default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/more_alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/more_alternate2.css']" "[@rel='alternate stylesheet']", '', True), ], })) @pytest.mark.sphinx('html', testroot='stylesheets') def test_alternate_stylesheets(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/stylesheets # outdir: /<>/tests/build/stylesheets/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ________________ test_alternate_stylesheets[index.html-expect7] ________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//link[@href='_static/more_alternate2.css'][@rel='alternate stylesheet']", '', True) @pytest.mark.parametrize("fname,expect", flat_dict({ 'index.html': [ (".//link[@href='_static/persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/alternate2.css']" "[@rel='alternate stylesheet']", '', True), (".//link[@href='_static/more_persistent.css']" "[@rel='stylesheet']", '', True), (".//link[@href='_static/more_default.css']" "[@rel='stylesheet']" "[@title='Default']", '', True), (".//link[@href='_static/more_alternate1.css']" "[@rel='alternate stylesheet']" "[@title='Alternate']", '', True), (".//link[@href='_static/more_alternate2.css']" "[@rel='alternate stylesheet']", '', True), ], })) @pytest.mark.sphinx('html', testroot='stylesheets') def test_alternate_stylesheets(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/stylesheets # outdir: /<>/tests/build/stylesheets/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________________ test_html_style ________________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='html_style') def test_html_style(app, status, warning): > app.build() tests/test_build_html.py:1263: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['contents']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/html_style # outdir: /<>/tests/build/html_style/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] contents looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________________ test_html_remote_images ____________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='images') def test_html_remote_images(app, status, warning): > app.builder.build_all() tests/test_build_html.py:1272: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'subdir/index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/images # outdir: /<>/tests/build/images/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] index reading sources... [100%] subdir/index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/images/subdir/index.rst: WARNING: document isn't included in any toctree ______________________________ test_html_sidebar _______________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='basic') def test_html_sidebar(app, status, warning): ctx = {} # default for alabaster > app.builder.build_all() tests/test_build_html.py:1285: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: ____________________ test_html_manpage[index.html-expect0] _____________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//em/a[@href='https://example.com/man.1']", '', True) @pytest.mark.parametrize('fname,expect', flat_dict({ 'index.html': [(".//em/a[@href='https://example.com/man.1']", "", True), (".//em/a[@href='https://example.com/ls.1']", "", True), (".//em/a[@href='https://example.com/sphinx.']", "", True)] })) @pytest.mark.sphinx('html', testroot='manpage_url', confoverrides={ 'manpages_url': 'https://example.com/{page}.{section}'}) @pytest.mark.test_params(shared_result='test_build_html_manpage_url') def test_html_manpage(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1337: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_manpage_url # outdir: /<>/tests/build/test_build_html_manpage_url/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________________ test_html_manpage[index.html-expect1] _____________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//em/a[@href='https://example.com/ls.1']", '', True) @pytest.mark.parametrize('fname,expect', flat_dict({ 'index.html': [(".//em/a[@href='https://example.com/man.1']", "", True), (".//em/a[@href='https://example.com/ls.1']", "", True), (".//em/a[@href='https://example.com/sphinx.']", "", True)] })) @pytest.mark.sphinx('html', testroot='manpage_url', confoverrides={ 'manpages_url': 'https://example.com/{page}.{section}'}) @pytest.mark.test_params(shared_result='test_build_html_manpage_url') def test_html_manpage(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1337: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_manpage_url # outdir: /<>/tests/build/test_build_html_manpage_url/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________________ test_html_manpage[index.html-expect2] _____________________ app = cached_etree_parse = , fname = 'index.html' expect = (".//em/a[@href='https://example.com/sphinx.']", '', True) @pytest.mark.parametrize('fname,expect', flat_dict({ 'index.html': [(".//em/a[@href='https://example.com/man.1']", "", True), (".//em/a[@href='https://example.com/ls.1']", "", True), (".//em/a[@href='https://example.com/sphinx.']", "", True)] })) @pytest.mark.sphinx('html', testroot='manpage_url', confoverrides={ 'manpages_url': 'https://example.com/{page}.{section}'}) @pytest.mark.test_params(shared_result='test_build_html_manpage_url') def test_html_manpage(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html.py:1337: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_manpage_url # outdir: /<>/tests/build/test_build_html_manpage_url/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________________ test_html_baseurl _______________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='toctree-glob', confoverrides={'html_baseurl': 'https://example.com/'}) def test_html_baseurl(app, status, warning): > app.build() tests/test_build_html.py:1344: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar/bar_1', 'bar/bar_2', 'bar/bar_3', 'bar/bar_4/index', 'bar/index', 'baz', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/toctree-glob # outdir: /<>/tests/build/toctree-glob/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 12 source files that are out of date updating environment: 12 added, 0 changed, 0 removed reading sources... [ 8%] bar/bar_1 reading sources... [ 16%] bar/bar_2 reading sources... [ 25%] bar/bar_3 reading sources... [ 33%] bar/bar_4/index reading sources... [ 41%] bar/index reading sources... [ 50%] baz reading sources... [ 58%] foo reading sources... [ 66%] index reading sources... [ 75%] quux reading sources... [ 83%] qux/index reading sources... [ 91%] qux/qux_1 reading sources... [100%] qux/qux_2 looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/toctree-glob/quux.rst: WARNING: document isn't included in any toctree ____________________ test_html_baseurl_and_html_file_suffix ____________________ app = status = warning = @pytest.mark.sphinx('html', testroot='toctree-glob', confoverrides={'html_baseurl': 'https://example.com/subdir', 'html_file_suffix': '.htm'}) def test_html_baseurl_and_html_file_suffix(app, status, warning): > app.build() tests/test_build_html.py:1357: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar/bar_1', 'bar/bar_2', 'bar/bar_3', 'bar/bar_4/index', 'bar/index', 'baz', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/toctree-glob # outdir: /<>/tests/build/toctree-glob/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 12 source files that are out of date updating environment: 12 added, 0 changed, 0 removed reading sources... [ 8%] bar/bar_1 reading sources... [ 16%] bar/bar_2 reading sources... [ 25%] bar/bar_3 reading sources... [ 33%] bar/bar_4/index reading sources... [ 41%] bar/index reading sources... [ 50%] baz reading sources... [ 58%] foo reading sources... [ 66%] index reading sources... [ 75%] quux reading sources... [ 83%] qux/index reading sources... [ 91%] qux/qux_1 reading sources... [100%] qux/qux_2 looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/toctree-glob/quux.rst: WARNING: document isn't included in any toctree ___________________ test_html5_output[autodoc.html-expect0] ____________________ app = cached_etree_parse = , fname = 'autodoc.html' expect = (".//dt[@id='autodoc_target.Class']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[autodoc.html-expect1] ____________________ app = cached_etree_parse = , fname = 'autodoc.html' expect = (".//dt[@id='autodoc_target.function']/em", '\\*\\*kwds') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[autodoc.html-expect2] ____________________ app = cached_etree_parse = , fname = 'autodoc.html' expect = ('.//dd/p', 'Return spam\\.') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html5_output[extapi.html-expect3] ____________________ app = cached_etree_parse = , fname = 'extapi.html' expect = ('.//strong', 'from class: Bar') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html5_output[markup.html-expect4] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//title', 'set by title directive') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html5_output[markup.html-expect5] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p/em', 'Section author: Georg Brandl') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html5_output[markup.html-expect6] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p/em', 'Module author: Georg Brandl') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html5_output[markup.html-expect7] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//meta[@name='author'][@content='Me']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html5_output[markup.html-expect8] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//meta[@name='keywords'][@content='docs, sphinx']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html5_output[markup.html-expect9] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@id='label']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect10] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//pre', '^some code$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect11] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//span[@class='option']", '--help') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect12] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//p[@class='admonition-title']", 'My Admonition') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect13] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@class='admonition note']/p", 'Note text.') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect14] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@class='admonition warning']/p", 'Warning text.') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect15] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li/p/strong', '^command\\\\n$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect16] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li/p/strong', '^program\\\\n$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect17] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li/p/em', '^dfn\\\\n$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect18] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li/p/kbd', '^kbd\\\\n$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect19] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//li/p/span', 'File ‣ Close') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect20] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//li/p/code/span[@class='pre']", '^a/$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect21] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//li/p/code/em/span[@class='pre']", '^varpart$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect22] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//li/p/code/em/span[@class='pre']", '^i$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect23] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='https://www.python.org/dev/peps/pep-0008'][@class='pep reference external']/strong", 'PEP 8') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect24] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='https://www.python.org/dev/peps/pep-0008'][@class='pep reference external']/strong", 'Python Enhancement Proposal #8') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect25] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='https://tools.ietf.org/html/rfc1.html'][@class='rfc reference external']/strong", 'RFC 1') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect26] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='https://tools.ietf.org/html/rfc1.html'][@class='rfc reference external']/strong", 'Request for Comments #1') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect27] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='objects.html#envvar-HOME'][@class='reference internal']/code/span[@class='pre']", 'HOME') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect28] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#with'][@class='reference internal']/code/span[@class='pre']", '^with$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect29] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#grammar-token-try-stmt'][@class='reference internal']/code/span", '^statement$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect30] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#some-label'][@class='reference internal']/span", '^here$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect31] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#some-label'][@class='reference internal']/span", '^there$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect32] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='subdir/includes.html'][@class='reference internal']/span", 'Including in subdir') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect33] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='objects.html#cmdoption-python-c'][@class='reference internal']/code/span[@class='pre']", '-c') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect34] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//abbr[@title='abbreviation']", '^abbr$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect35] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@class='versionadded']/p/span", 'New in version 0.6: ') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect36] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@class='versionadded']/p/span", ) @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect37] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@class='versionchanged']/p/span", ) @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect38] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect39] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@class='footnote-reference brackets']", '1') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect40] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='contents.html#ref1']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect41] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//div/p[@class='admonition-title']", 'See also') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect42] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect43] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//p[@class='centered']/strong", 'LICENSE') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect44] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//dl/dt[@id='term-boson']", 'boson') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect45] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//pre/strong', 'try_stmt') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect46] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect47] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p', 'A global substitution.') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect48] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p', 'In HTML.') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect49] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p', 'In both.') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect50] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = ('.//p', 'Always present') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect51] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#with']/span", 'headings') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect52] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='objects.html#func_without_body']/code/span", 'objects') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[markup.html-expect53] ____________________ app = cached_etree_parse = , fname = 'markup.html' expect = (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect54] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = ('.//pre', 'Max Strauß') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect55] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//a[@class='reference download internal']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect56] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = ('.//pre/span', '"quotes"') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect57] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = ('.//pre/span', "'included'") @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect58] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//pre/span[@class='s2']", 'üöä') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect59] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", '^class Foo:\\n pass\\n\\s*$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect60] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", '^ def baz\\(\\):\\n pass\\n\\s*$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect61] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-lines highlight-text notranslate']//pre", '^class Foo:\\n pass\\nclass Bar:\\n$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect62] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-startend highlight-text notranslate']//pre", '^foo = "Including Unicode characters: üöä"\n$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect63] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-preappend highlight-text notranslate']//pre", '(?m)^START CODE$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect64] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", 'def') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect65] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-tab3 highlight-text notranslate']//pre", '-| |-') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[includes.html-expect66] ___________________ app = cached_etree_parse = , fname = 'includes.html' expect = (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", '-| |-') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect67] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@id='mod.Cls.meth1']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect68] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@id='errmod.Error']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect69] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = ('.//dt/code', 'long\\(parameter,\\s* list\\)') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect70] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = ('.//dt/code', 'another one') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect71] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#mod.Cls'][@class='reference internal']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect72] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dl[@class='userdesc']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect73] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@id='userdesc-myobj']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect74] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#userdesc-myobj'][@class='reference internal']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect75] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect76] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#Time']", 'Time') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect77] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect78] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//span[@class='pre']", 'CFunction()') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect79] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#c.Sphinx_DoSomething']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect80] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#c.SphinxStruct.member']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect81] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#c.SPHINX_USE_PYTHON']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect82] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#c.SphinxType']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect83] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@href='#c.sphinx_global']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect84] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect85] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect86] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@class='field-odd']", 'Field_name') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect87] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@class='field-even']", 'Field_name all lower') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect88] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@class='field-odd']", 'FIELD_NAME') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect89] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect90] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@class='field-odd']", 'Field_Name') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect91] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@class='field-even']", 'Field_Name All Word Caps') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect92] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@class='field-odd']", 'Field_name') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect93] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@class='field-even']", 'Field_name First word cap') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect94] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@class='field-odd']", 'FIELd_name') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect95] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dt[@class='field-even']", 'FIELd_name PARTial caps') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect96] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = ('.//h4', 'Custom sidebar') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect97] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dd[@class='field-odd']/p/strong", '^moo$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect98] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dd[@class='field-odd']/p/strong", ) @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[objects.html-expect99] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect100] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect101] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//dd[@class='field-odd']/ul/li/p/em", ) @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect102] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect103] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect104] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect105] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect106] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']/code/span", 'create-auth-token') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect107] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect108] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect109] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect110] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect111] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[objects.html-expect112] ___________________ app = cached_etree_parse = , fname = 'objects.html' expect = (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect113] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//meta[@name='hc'][@content='hcval']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect114] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//meta[@name='hc_co'][@content='hcval_co']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect115] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//dt[@class='label']/span[@class='brackets']", 'Ref1') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect116] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//dt[@class='label']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect117] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//li[@class='toctree-l1']/a", 'Testing various markup') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect118] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//li[@class='toctree-l2']/a", 'Inline markup') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect119] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = ('.//title', 'Sphinx ') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect120] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//div[@class='footer']", 'Georg Brandl & Team') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect121] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//a[@href='http://python.org/'][@class='reference external']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect122] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//li/p/a[@href='genindex.html']/span", 'Index') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect123] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//li/p/a[@href='py-modindex.html']/span", 'Module Index') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect124] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//li/p/a[@href='search.html']/span", 'Search Page') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect125] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = ('.//h4', 'Contents sidebar') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect126] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//script[@src='file://moo.js']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect127] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect128] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[contents.html-expect129] __________________ app = cached_etree_parse = , fname = 'contents.html' expect = (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[images.html-expect130] ___________________ app = cached_etree_parse = , fname = 'images.html' expect = (".//img[@src='_images/img.png']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[images.html-expect131] ___________________ app = cached_etree_parse = , fname = 'images.html' expect = (".//img[@src='_images/img1.png']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[images.html-expect132] ___________________ app = cached_etree_parse = , fname = 'images.html' expect = (".//img[@src='_images/simg.png']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[images.html-expect133] ___________________ app = cached_etree_parse = , fname = 'images.html' expect = (".//img[@src='_images/svgimg.svg']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________ test_html5_output[images.html-expect134] ___________________ app = cached_etree_parse = , fname = 'images.html' expect = (".//a[@href='_sources/images.txt']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[otherext.html-expect135] __________________ app = cached_etree_parse = , fname = 'otherext.html' expect = ('.//h1', 'Generated section') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[otherext.html-expect136] __________________ app = cached_etree_parse = , fname = 'otherext.html' expect = (".//a[@href='_sources/otherext.foo.txt']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect137] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", '1') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect138] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", '2') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect139] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", '3') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect140] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='reference internal'][@href='#bar'][@id='id4']", '\\[bar\\]') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect141] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", '\\[baz_qux\\]') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect142] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", '4') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect143] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", '5') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect144] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id1']", '1') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect145] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id2']", '2') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect146] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id3']", '3') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect147] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id4']", 'bar') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect148] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id5']", 'baz_qux') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect149] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id6']", '4') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect150] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id7']", '5') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[footnote.html-expect151] __________________ app = cached_etree_parse = , fname = 'footnote.html' expect = (".//a[@class='fn-backref'][@href='#id8']", '6') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ____________________ test_html5_output[bom.html-expect152] _____________________ app = cached_etree_parse = , fname = 'bom.html' expect = ('.//title', ' File with UTF-8 BOM') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ______________ test_html5_output[subdir/includes.html-expect153] _______________ app = cached_etree_parse = fname = 'subdir/includes.html' expect = (".//a[@class='reference download internal']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ______________ test_html5_output[subdir/includes.html-expect154] _______________ app = cached_etree_parse = fname = 'subdir/includes.html' expect = (".//img[@src='../_images/img.png']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ______________ test_html5_output[subdir/includes.html-expect155] _______________ app = cached_etree_parse = fname = 'subdir/includes.html', expect = ('.//p', 'This is an include file.') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ______________ test_html5_output[subdir/includes.html-expect156] _______________ app = cached_etree_parse = fname = 'subdir/includes.html', expect = ('.//pre/span', 'line 1') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ______________ test_html5_output[subdir/includes.html-expect157] _______________ app = cached_etree_parse = fname = 'subdir/includes.html', expect = ('.//pre/span', 'line 2') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _______________ test_html5_output[subdir/images.html-expect158] ________________ app = cached_etree_parse = fname = 'subdir/images.html' expect = (".//img[@src='../_images/img1.png']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _______________ test_html5_output[subdir/images.html-expect159] ________________ app = cached_etree_parse = fname = 'subdir/images.html' expect = (".//img[@src='../_images/rimg.png']", '') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _________________ test_html5_output[extensions.html-expect160] _________________ app = cached_etree_parse = fname = 'extensions.html' expect = (".//a[@href='http://python.org/dev/']", 'http://python.org/dev/') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _________________ test_html5_output[extensions.html-expect161] _________________ app = cached_etree_parse = fname = 'extensions.html' expect = (".//a[@href='http://bugs.python.org/issue1000']", 'issue 1000') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) _________________ test_html5_output[extensions.html-expect162] _________________ app = cached_etree_parse = fname = 'extensions.html' expect = (".//a[@href='http://bugs.python.org/issue1042']", 'explicit caption') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[genindex.html-expect163] __________________ app = cached_etree_parse = , fname = 'genindex.html' expect = ('.//a/strong', 'Main') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[genindex.html-expect164] __________________ app = cached_etree_parse = , fname = 'genindex.html' expect = ('.//a/strong', '[1]') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[genindex.html-expect165] __________________ app = cached_etree_parse = , fname = 'genindex.html' expect = ('.//a/strong', 'Other') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[genindex.html-expect166] __________________ app = cached_etree_parse = , fname = 'genindex.html' expect = ('.//a', 'entry') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________ test_html5_output[genindex.html-expect167] __________________ app = cached_etree_parse = , fname = 'genindex.html' expect = ('.//li/a', 'double') @pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), (".//img[@src='_images/img1.png']", ''), (".//img[@src='_images/simg.png']", ''), (".//img[@src='_images/svgimg.svg']", ''), (".//a[@href='_sources/images.txt']", ''), ], 'subdir/images.html': [ (".//img[@src='../_images/img1.png']", ''), (".//img[@src='../_images/rimg.png']", ''), ], 'subdir/includes.html': [ (".//a[@class='reference download internal']", ''), (".//img[@src='../_images/img.png']", ''), (".//p", 'This is an include file.'), (".//pre/span", 'line 1'), (".//pre/span", 'line 2'), ], 'includes.html': [ (".//pre", u'Max Strauß'), (".//a[@class='reference download internal']", ''), (".//pre/span", u'"quotes"'), (".//pre/span", u"'included'"), (".//pre/span[@class='s2']", u'üöä'), (".//div[@class='inc-pyobj1 highlight-text notranslate']//pre", r'^class Foo:\n pass\n\s*$'), (".//div[@class='inc-pyobj2 highlight-text notranslate']//pre", r'^ def baz\(\):\n pass\n\s*$'), (".//div[@class='inc-lines highlight-text notranslate']//pre", r'^class Foo:\n pass\nclass Bar:\n$'), (".//div[@class='inc-startend highlight-text notranslate']//pre", u'^foo = "Including Unicode characters: üöä"\\n$'), (".//div[@class='inc-preappend highlight-text notranslate']//pre", r'(?m)^START CODE$'), (".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span", r'def'), (".//div[@class='inc-tab3 highlight-text notranslate']//pre", r'-| |-'), (".//div[@class='inc-tab8 highlight-python notranslate']//pre/span", r'-| |-'), ], 'autodoc.html': [ (".//dt[@id='autodoc_target.Class']", ''), (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ (".//strong", 'from class: Bar'), ], 'markup.html': [ (".//title", 'set by title directive'), (".//p/em", 'Section author: Georg Brandl'), (".//p/em", 'Module author: Georg Brandl'), # created by the meta directive (".//meta[@name='author'][@content='Me']", ''), (".//meta[@name='keywords'][@content='docs, sphinx']", ''), # a label created by ``.. _label:`` (".//div[@id='label']", ''), # code with standard code blocks (".//pre", '^some code$'), # an option list (".//span[@class='option']", '--help'), # admonitions (".//p[@class='admonition-title']", 'My Admonition'), (".//div[@class='admonition note']/p", 'Note text.'), (".//div[@class='admonition warning']/p", 'Warning text.'), # inline markup (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), (".//li/p/code/em/span[@class='pre']", '^i$'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'PEP 8'), (".//a[@href='https://www.python.org/dev/peps/pep-0008']" "[@class='pep reference external']/strong", 'Python Enhancement Proposal #8'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'RFC 1'), (".//a[@href='https://tools.ietf.org/html/rfc1.html']" "[@class='rfc reference external']/strong", 'Request for Comments #1'), (".//a[@href='objects.html#envvar-HOME']" "[@class='reference internal']/code/span[@class='pre']", 'HOME'), (".//a[@href='#with']" "[@class='reference internal']/code/span[@class='pre']", '^with$'), (".//a[@href='#grammar-token-try-stmt']" "[@class='reference internal']/code/span", '^statement$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^here$'), (".//a[@href='#some-label'][@class='reference internal']/span", '^there$'), (".//a[@href='subdir/includes.html']" "[@class='reference internal']/span", 'Including in subdir'), (".//a[@href='objects.html#cmdoption-python-c']" "[@class='reference internal']/code/span[@class='pre']", '-c'), # abbreviations (".//abbr[@title='abbreviation']", '^abbr$'), # version stuff (".//div[@class='versionadded']/p/span", 'New in version 0.6: '), (".//div[@class='versionadded']/p/span", tail_check('First paragraph of versionadded')), (".//div[@class='versionchanged']/p/span", tail_check('First paragraph of versionchanged')), (".//div[@class='versionchanged']/p", 'Second paragraph of versionchanged'), # footnote reference (".//a[@class='footnote-reference brackets']", r'1'), # created by reference lookup (".//a[@href='contents.html#ref1']", ''), # ``seealso`` directive (".//div/p[@class='admonition-title']", 'See also'), # a ``hlist`` directive (".//table[@class='hlist']/tbody/tr/td/ul/li/p", '^This$'), # a ``centered`` directive (".//p[@class='centered']/strong", 'LICENSE'), # a glossary (".//dl/dt[@id='term-boson']", 'boson'), # a production list (".//pre/strong", 'try_stmt'), (".//pre/a[@href='#grammar-token-try1-stmt']/code/span", 'try1_stmt'), # tests for ``only`` directive (".//p", 'A global substitution.'), (".//p", 'In HTML.'), (".//p", 'In both.'), (".//p", 'Always present'), # tests for ``any`` role (".//a[@href='#with']/span", 'headings'), (".//a[@href='objects.html#func_without_body']/code/span", 'objects'), # tests for numeric labels (".//a[@href='#id1'][@class='reference internal']/span", 'Testing various markup'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''), (".//dt[@id='errmod.Error']", ''), (".//dt/code", r'long\(parameter,\s* list\)'), (".//dt/code", 'another one'), (".//a[@href='#mod.Cls'][@class='reference internal']", ''), (".//dl[@class='userdesc']", ''), (".//dt[@id='userdesc-myobj']", ''), (".//a[@href='#userdesc-myobj'][@class='reference internal']", ''), # docfields (".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'), (".//a[@class='reference internal'][@href='#Time']", 'Time'), (".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'), # C references (".//span[@class='pre']", 'CFunction()'), (".//a[@href='#c.Sphinx_DoSomething']", ''), (".//a[@href='#c.SphinxStruct.member']", ''), (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='#']", 'Testing object descriptions'), (".//li[@class='toctree-l1']/a[@href='markup.html']", 'Testing various markup'), # test unknown field names (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name all lower'), (".//dt[@class='field-odd']", 'FIELD_NAME'), (".//dt[@class='field-even']", 'FIELD_NAME ALL CAPS'), (".//dt[@class='field-odd']", 'Field_Name'), (".//dt[@class='field-even']", 'Field_Name All Word Caps'), (".//dt[@class='field-odd']", 'Field_name'), (".//dt[@class='field-even']", 'Field_name First word cap'), (".//dt[@class='field-odd']", 'FIELd_name'), (".//dt[@class='field-even']", 'FIELd_name PARTial caps'), # custom sidebar (".//h4", 'Custom sidebar'), # docfields (".//dd[@class='field-odd']/p/strong", '^moo$'), (".//dd[@class='field-odd']/p/strong", tail_check(r'\(Moo\) .* Moo')), (".//dd[@class='field-odd']/ul/li/p/strong", '^hour$'), (".//dd[@class='field-odd']/ul/li/p/em", '^DuplicateType$'), (".//dd[@class='field-odd']/ul/li/p/em", tail_check(r'.* Some parameter')), # others (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", 'perl'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span", '\\+p'), (".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span", '--ObjC\\+\\+'), (".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span", '--plugin.option'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']" "/code/span", 'create-auth-token'), (".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span", 'arg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'hg'), (".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'git'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", 'commit'), (".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span", '-p'), ], 'contents.html': [ (".//meta[@name='hc'][@content='hcval']", ''), (".//meta[@name='hc_co'][@content='hcval_co']", ''), (".//dt[@class='label']/span[@class='brackets']", r'Ref1'), (".//dt[@class='label']", ''), (".//li[@class='toctree-l1']/a", 'Testing various markup'), (".//li[@class='toctree-l2']/a", 'Inline markup'), (".//title", 'Sphinx '), (".//div[@class='footer']", 'Georg Brandl & Team'), (".//a[@href='http://python.org/']" "[@class='reference external']", ''), (".//li/p/a[@href='genindex.html']/span", 'Index'), (".//li/p/a[@href='py-modindex.html']/span", 'Module Index'), (".//li/p/a[@href='search.html']/span", 'Search Page'), # custom sidebar only for contents (".//h4", 'Contents sidebar'), # custom JavaScript (".//script[@src='file://moo.js']", ''), # URL in contents (".//a[@class='reference external'][@href='http://sphinx-doc.org/']", 'http://sphinx-doc.org/'), (".//a[@class='reference external'][@href='http://sphinx-doc.org/latest/']", 'Latest reference'), # Indirect hyperlink targets across files (".//a[@href='markup.html#some-label'][@class='reference internal']/span", '^indirect hyperref$'), ], 'bom.html': [ (".//title", " File with UTF-8 BOM"), ], 'extensions.html': [ (".//a[@href='http://python.org/dev/']", "http://python.org/dev/"), (".//a[@href='http://bugs.python.org/issue1000']", "issue 1000"), (".//a[@href='http://bugs.python.org/issue1042']", "explicit caption"), ], 'genindex.html': [ # index entries (".//a/strong", "Main"), (".//a/strong", "[1]"), (".//a/strong", "Other"), (".//a", "entry"), (".//li/a", "double"), ], 'footnote.html': [ (".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"), (".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"), (".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"), (".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"), (".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"), (".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"), (".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"), (".//a[@class='fn-backref'][@href='#id1']", r"1"), (".//a[@class='fn-backref'][@href='#id2']", r"2"), (".//a[@class='fn-backref'][@href='#id3']", r"3"), (".//a[@class='fn-backref'][@href='#id4']", r"bar"), (".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"), (".//a[@class='fn-backref'][@href='#id6']", r"4"), (".//a[@class='fn-backref'][@href='#id7']", r"5"), (".//a[@class='fn-backref'][@href='#id8']", r"6"), ], 'otherext.html': [ (".//h1", "Generated section"), (".//a[@href='_sources/otherext.foo.txt']", ''), ] })) @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html5_output') def test_html5_output(app, cached_etree_parse, fname, expect): > app.build() tests/test_build_html5.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html5_output # outdir: /<>/tests/build/test_build_html5_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html5_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html5_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html5_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html5_output/nonexisting.png /<>/tests/build/test_build_html5_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html5_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ______________________________ test_html_download ______________________________ app = @pytest.mark.sphinx('html', tags=['testtag'], confoverrides={ 'html_context.hckey_co': 'hcval_co', 'html_experimental_html5_writer': True}) @pytest.mark.test_params(shared_result='test_build_html_output') def test_html_download(app): > app.build() tests/test_build_html5.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['autodoc', 'bom', 'contents', 'extapi', 'extensions', 'footnote', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/test_build_html_output # outdir: /<>/tests/build/test_build_html_output/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_build_html_output/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_build_html_output/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_build_html_output/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_build_html_output/nonexisting.png /<>/tests/build/test_build_html_output/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_build_html_output/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________________ test_html_download_role ____________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='roles-download', confoverrides={'html_experimental_html5_writer': True}) def test_html_download_role(app, status, warning): > app.build() tests/test_build_html5.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/roles-download # outdir: /<>/tests/build/roles-download/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/roles-download/index.rst:5: WARNING: download file not readable: /<>/tests/build/roles-download/not_found.dat ___________________________________ test_chm ___________________________________ app = @pytest.mark.sphinx('htmlhelp', testroot='build-htmlhelp') def test_chm(app): > app.build() tests/test_build_htmlhelp.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/htmlhelp.py:245: in write_doc StandaloneHTMLBuilder.write_doc(self, docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'index' addctx = {'body': '

Index markup

', 'display_toc': False, 'meta': {}, 'metatags': '', ...} templatename = 'page.html' outfilename = '/<>/tests/build/build-htmlhelp/_build/htmlhelp/index.html' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: htmlhelp # srcdir: /<>/tests/build/build-htmlhelp # outdir: /<>/tests/build/build-htmlhelp/_build/htmlhelp # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [htmlhelp]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] index # warning: _____________________ test_build_latex_doc[pdflatex-howto] _____________________ app = status = warning = , engine = 'pdflatex' docclass = 'howto' @skip_if_requested @skip_if_stylefiles_notfound @pytest.mark.parametrize( "engine,docclass", product(LATEX_ENGINES, DOCCLASSES), ) @pytest.mark.sphinx('latex') def test_build_latex_doc(app, status, warning, engine, docclass): app.config.latex_engine = engine app.config.latex_documents[0] = app.config.latex_documents[0][:4] + (docclass,) LaTeXTranslator.ignore_missing_images = True > app.builder.build_all() tests/test_build_latex.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/root/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxTests.tex...contents extapi images subdir/images subdir/includes includes markup objects bom math autodoc metadata extensions footnote lists otherext resolving references... writing... done copying images... [ 12%] img.foo.png copying images... [ 25%] img.png copying images... [ 37%] subdir/simg.png copying images... [ 50%] subdir/img.png copying images... [ 62%] svgimg.pdf copying images... [ 75%] ../root/img.png copying images... [ 87%] img.pdf copying images... [100%] rimg.png copying TeX support files... # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) WARNING: Could not fetch remote image: https://www.python.org/static/img/python-logo.png [HTTPSConnectionPool(host='www.python.org', port=443): Max retries exceeded with url: /static/img/python-logo.png (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))] ____________________ test_build_latex_doc[pdflatex-manual] _____________________ app = status = warning = , engine = 'pdflatex' docclass = 'manual' @skip_if_requested @skip_if_stylefiles_notfound @pytest.mark.parametrize( "engine,docclass", product(LATEX_ENGINES, DOCCLASSES), ) @pytest.mark.sphinx('latex') def test_build_latex_doc(app, status, warning, engine, docclass): app.config.latex_engine = engine app.config.latex_documents[0] = app.config.latex_documents[0][:4] + (docclass,) LaTeXTranslator.ignore_missing_images = True > app.builder.build_all() tests/test_build_latex.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/root/_build/latex/SphinxTests.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...ref{objects:\detokenize{module-mod}} \end{sphinxtheindex} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxTests.tex...contents extapi images subdir/images subdir/includes includes markup objects bom math autodoc metadata extensions footnote lists otherext resolving references... writing... # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) WARNING: Could not fetch remote image: https://www.python.org/static/img/python-logo.png [HTTPSConnectionPool(host='www.python.org', port=443): Max retries exceeded with url: /static/img/python-logo.png (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))] _____________________ test_build_latex_doc[lualatex-howto] _____________________ app = status = warning = , engine = 'lualatex' docclass = 'howto' @skip_if_requested @skip_if_stylefiles_notfound @pytest.mark.parametrize( "engine,docclass", product(LATEX_ENGINES, DOCCLASSES), ) @pytest.mark.sphinx('latex') def test_build_latex_doc(app, status, warning, engine, docclass): app.config.latex_engine = engine app.config.latex_documents[0] = app.config.latex_documents[0][:4] + (docclass,) LaTeXTranslator.ignore_missing_images = True > app.builder.build_all() tests/test_build_latex.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/root/_build/latex/SphinxTests.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{article} \IfFileExists{luatex85.sty} {\RequirePackage{luatex85}} {\ifde...ref{objects:\detokenize{module-mod}} \end{sphinxtheindex} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxTests.tex...contents extapi images subdir/images subdir/includes includes markup objects bom math autodoc metadata extensions footnote lists otherext resolving references... writing... # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) WARNING: Could not fetch remote image: https://www.python.org/static/img/python-logo.png [HTTPSConnectionPool(host='www.python.org', port=443): Max retries exceeded with url: /static/img/python-logo.png (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))] ____________________ test_build_latex_doc[lualatex-manual] _____________________ app = status = warning = , engine = 'lualatex' docclass = 'manual' @skip_if_requested @skip_if_stylefiles_notfound @pytest.mark.parametrize( "engine,docclass", product(LATEX_ENGINES, DOCCLASSES), ) @pytest.mark.sphinx('latex') def test_build_latex_doc(app, status, warning, engine, docclass): app.config.latex_engine = engine app.config.latex_documents[0] = app.config.latex_documents[0][:4] + (docclass,) LaTeXTranslator.ignore_missing_images = True > app.builder.build_all() tests/test_build_latex.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/root/_build/latex/SphinxTests.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \IfFileExists{luatex85.sty} {\RequirePackage{luatex85}} {\ifdef...ref{objects:\detokenize{module-mod}} \end{sphinxtheindex} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxTests.tex...contents extapi images subdir/images subdir/includes includes markup objects bom math autodoc metadata extensions footnote lists otherext resolving references... writing... # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) WARNING: Could not fetch remote image: https://www.python.org/static/img/python-logo.png [HTTPSConnectionPool(host='www.python.org', port=443): Max retries exceeded with url: /static/img/python-logo.png (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))] _____________________ test_build_latex_doc[xelatex-howto] ______________________ app = status = warning = , engine = 'xelatex' docclass = 'howto' @skip_if_requested @skip_if_stylefiles_notfound @pytest.mark.parametrize( "engine,docclass", product(LATEX_ENGINES, DOCCLASSES), ) @pytest.mark.sphinx('latex') def test_build_latex_doc(app, status, warning, engine, docclass): app.config.latex_engine = engine app.config.latex_documents[0] = app.config.latex_documents[0][:4] + (docclass,) LaTeXTranslator.ignore_missing_images = True > app.builder.build_all() tests/test_build_latex.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/root/_build/latex/SphinxTests.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{article} \documentclass[letterpaper,10pt,english]{sphinxhowto} \ifdefined...ref{objects:\detokenize{module-mod}} \end{sphinxtheindex} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxTests.tex...contents extapi images subdir/images subdir/includes includes markup objects bom math autodoc metadata extensions footnote lists otherext resolving references... writing... # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) WARNING: Could not fetch remote image: https://www.python.org/static/img/python-logo.png [HTTPSConnectionPool(host='www.python.org', port=443): Max retries exceeded with url: /static/img/python-logo.png (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))] _____________________ test_build_latex_doc[xelatex-manual] _____________________ app = status = warning = , engine = 'xelatex' docclass = 'manual' @skip_if_requested @skip_if_stylefiles_notfound @pytest.mark.parametrize( "engine,docclass", product(LATEX_ENGINES, DOCCLASSES), ) @pytest.mark.sphinx('latex') def test_build_latex_doc(app, status, warning, engine, docclass): app.config.latex_engine = engine app.config.latex_documents[0] = app.config.latex_documents[0][:4] + (docclass,) LaTeXTranslator.ignore_missing_images = True > app.builder.build_all() tests/test_build_latex.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/root/_build/latex/SphinxTests.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...ref{objects:\detokenize{module-mod}} \end{sphinxtheindex} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxTests.tex...contents extapi images subdir/images subdir/includes includes markup objects bom math autodoc metadata extensions footnote lists otherext resolving references... writing... # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) WARNING: Could not fetch remote image: https://www.python.org/static/img/python-logo.png [HTTPSConnectionPool(host='www.python.org', port=443): Max retries exceeded with url: /static/img/python-logo.png (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))] _________________________________ test_writer __________________________________ app = status = warning = @pytest.mark.sphinx('latex') def test_writer(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/root/_build/latex/SphinxTests.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...ref{objects:\detokenize{module-mod}} \end{sphinxtheindex} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxTests.tex...contents extapi images subdir/images subdir/includes includes markup objects bom math autodoc metadata extensions footnote lists otherext resolving references... writing... # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) WARNING: Could not fetch remote image: https://www.python.org/static/img/python-logo.png [HTTPSConnectionPool(host='www.python.org', port=443): Max retries exceeded with url: /static/img/python-logo.png (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))] _____________________________ test_latex_warnings ______________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='warnings', freshenv=True) def test_latex_warnings(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:156: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/warnings/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/warnings # outdir: /<>/tests/build/warnings/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] index reading sources... [100%] undecodable looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index resolving references... writing... done copying images... [100%] svgimg.pdf copying TeX support files... # warning: /<>/tests/build/warnings/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/warnings/index.rst:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/warnings/index.rst:11: WARNING: image file not readable: foo.png /<>/tests/build/warnings/index.rst:24: WARNING: download file not readable: /<>/tests/build/warnings/nonexisting.png /<>/tests/build/warnings/index.rst:27: WARNING: invalid single index entry u'' /<>/tests/build/warnings/undecodable.rst:3: WARNING: undecodable source characters, replacing with "?": 'here: >>>\xbb<<<' /<>/tests/build/warnings/index.rst:41: WARNING: unknown option: &option /<>/tests/build/warnings/index.rst:45: WARNING: citation not found: missing /<>/tests/build/warnings/index.rst:14: WARNING: a suitable image for latex builder not found: foo.* /<>/tests/build/warnings/index.rst:33: WARNING: Could not lex literal_block as "c". Highlighting skipped. _______________________________ test_latex_basic _______________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='basic') def test_latex_basic(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/basic/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing test.tex...index resolving references... writing... done copying TeX support files... # warning: ______________________ test_latex_title_after_admonitions ______________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='latex-title') def test_latex_title_after_admonitions(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:181: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/latex-title/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-title # outdir: /<>/tests/build/latex-title/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index resolving references... writing... done copying TeX support files... # warning: /<>/tests/build/latex-title/index.rst:8: WARNING: toctree contains reference to nonexisting document u'foo' /<>/tests/build/latex-title/index.rst:8: WARNING: toctree contains reference to nonexisting document u'bar' ______________________________ test_latex_release ______________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='basic', confoverrides={'release': '1.0'}) def test_latex_release(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:192: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/basic/_build/latex/test.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{report} \ifdefined\pdfpx...trings \item {} Setuptools integration \end{itemize} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index resolving references... writing... # warning: _________________________________ test_numref __________________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='numfig', confoverrides={'numfig': True}) def test_numref(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:204: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/numfig/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/numfig # outdir: /<>/tests/build/numfig/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar baz resolving references... writing... done copying images... [100%] rimg.png copying TeX support files... # warning: /<>/tests/build/numfig/index.rst:56: WARNING: invalid numfig_format: invalid /<>/tests/build/numfig/index.rst:57: WARNING: invalid numfig_format: Fig %s %s ___________________________ test_numref_with_prefix1 ___________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='numfig', confoverrides={'numfig': True, 'numfig_format': {'figure': 'Figure:%s', 'table': 'Tab_%s', 'code-block': 'Code-%s', 'section': 'SECTION-%s'}}) def test_numref_with_prefix1(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:242: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/numfig/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...oo:foo}} \nameref{\detokenize{foo:foo}}} \end{itemize} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/numfig # outdir: /<>/tests/build/numfig/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar baz resolving references... writing... # warning: /<>/tests/build/numfig/index.rst:56: WARNING: invalid numfig_format: invalid /<>/tests/build/numfig/index.rst:57: WARNING: invalid numfig_format: Fig %s %s ___________________________ test_numref_with_prefix2 ___________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='numfig', confoverrides={'numfig': True, 'numfig_format': {'figure': 'Figure:%s.', 'table': 'Tab_%s:', 'code-block': 'Code-%s | ', 'section': 'SECTION_%s_'}}) def test_numref_with_prefix2(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/numfig/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...oo:foo}} \nameref{\detokenize{foo:foo}}} \end{itemize} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/numfig # outdir: /<>/tests/build/numfig/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar baz resolving references... writing... # warning: /<>/tests/build/numfig/index.rst:56: WARNING: invalid numfig_format: invalid /<>/tests/build/numfig/index.rst:57: WARNING: invalid numfig_format: Fig %s %s _________________________ test_numref_with_language_ja _________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='numfig', confoverrides={'numfig': True, 'language': 'ja'}) def test_numref_with_language_ja(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/numfig/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{jsbook} \documentclass[letterpaper,10pt,dvipdfmx]{sphinxmanual} \ifdefine...e{foo:foo}} \nameref{\detokenize{foo:foo}}} \end{itemize} \renewcommand{\indexname}{索引} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/numfig # outdir: /<>/tests/build/numfig/_build/latex # status: Running Sphinx v1.8.5 loading translations [ja]... done loading pickled environment... done building [latex]: all source files updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] bar reading sources... [ 50%] baz reading sources... [ 75%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar baz resolving references... writing... # warning: /<>/tests/build/numfig/index.rst:56: WARNING: invalid numfig_format: invalid /<>/tests/build/numfig/index.rst:57: WARNING: invalid numfig_format: Fig %s %s _______________________ test_latex_obey_numfig_is_false ________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='latex-numfig') def test_latex_obey_numfig_is_false(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:354: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/latex-numfig/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-numfig # outdir: /<>/tests/build/latex-numfig/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] indexhowto reading sources... [100%] indexmanual looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxManual.tex...indexmanual resolving references... writing... done processing SphinxHowTo.tex...indexhowto resolving references... writing... done copying TeX support files... # warning: _________________ test_latex_obey_numfig_secnum_depth_is_zero __________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='latex-numfig', confoverrides={'numfig': True, 'numfig_secnum_depth': 0}) def test_latex_obey_numfig_secnum_depth_is_zero(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:367: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-numfig/_build/latex/SphinxManual.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...ection} \label{\detokenize{indexmanual:this-is-section}} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-numfig # outdir: /<>/tests/build/latex-numfig/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] indexhowto reading sources... [100%] indexmanual looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxManual.tex...indexmanual resolving references... writing... # warning: __________________ test_latex_obey_numfig_secnum_depth_is_two __________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='latex-numfig', confoverrides={'numfig': True, 'numfig_secnum_depth': 2}) def test_latex_obey_numfig_secnum_depth_is_two(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:380: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-numfig/_build/latex/SphinxManual.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...ection} \label{\detokenize{indexmanual:this-is-section}} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-numfig # outdir: /<>/tests/build/latex-numfig/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] indexhowto reading sources... [100%] indexmanual looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxManual.tex...indexmanual resolving references... writing... # warning: _________________ test_latex_obey_numfig_but_math_numfig_false _________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='latex-numfig', confoverrides={'numfig': True, 'math_numfig': False}) def test_latex_obey_numfig_but_math_numfig_false(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:393: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-numfig/_build/latex/SphinxManual.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...ection} \label{\detokenize{indexmanual:this-is-section}} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-numfig # outdir: /<>/tests/build/latex-numfig/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] indexhowto reading sources... [100%] indexmanual looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxManual.tex...indexmanual resolving references... writing... # warning: _________________________ test_latex_add_latex_package _________________________ app = status = warning = @pytest.mark.sphinx('latex') def test_latex_add_latex_package(app, status, warning): app.add_latex_package('foo') app.add_latex_package('bar', 'baz') > app.builder.build_all() tests/test_build_latex.py:406: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/root/_build/latex/SphinxTests.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...ref{objects:\detokenize{module-mod}} \end{sphinxtheindex} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxTests.tex...contents extapi images subdir/images subdir/includes includes markup objects bom math autodoc metadata extensions footnote lists otherext resolving references... writing... # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) WARNING: Could not fetch remote image: https://www.python.org/static/img/python-logo.png [HTTPSConnectionPool(host='www.python.org', port=443): Max retries exceeded with url: /static/img/python-logo.png (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))] _____________________ test_babel_with_no_language_settings _____________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='latex-babel') def test_babel_with_no_language_settings(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/latex-babel/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-babel # outdir: /<>/tests/build/latex-babel/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar resolving references... writing... done copying TeX support files... # warning: _________________________ test_babel_with_language_de __________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='latex-babel', confoverrides={'language': 'de'}) def test_babel_with_language_de(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:435: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-babel/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,ngerman]{sphinxmanual} \ifdefined...ze{bar:bar}}\label{\detokenize{bar::doc}} \renewcommand{\indexname}{Stichwortverzeichnis} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-babel # outdir: /<>/tests/build/latex-babel/_build/latex # status: Running Sphinx v1.8.5 loading translations [de]... done loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar resolving references... writing... # warning: _________________________ test_babel_with_language_ru __________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='latex-babel', confoverrides={'language': 'ru'}) def test_babel_with_language_ru(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:456: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-babel/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,russian]{sphinxmanual} \ifdefined...ze{bar:bar}}\label{\detokenize{bar::doc}} \renewcommand{\indexname}{Алфавитный указатель} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-babel # outdir: /<>/tests/build/latex-babel/_build/latex # status: Running Sphinx v1.8.5 loading translations [ru]... done loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar resolving references... writing... # warning: _________________________ test_babel_with_language_tr __________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='latex-babel', confoverrides={'language': 'tr'}) def test_babel_with_language_tr(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:478: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-babel/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,turkish]{sphinxmanual} \ifdefined...label{\detokenize{bar:bar}}\label{\detokenize{bar::doc}} \renewcommand{\indexname}{Dizin} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-babel # outdir: /<>/tests/build/latex-babel/_build/latex # status: Running Sphinx v1.8.5 loading translations [tr]... done loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar resolving references... writing... # warning: /<>/tests/build/latex-babel/bar.rst:: WARNING: language "tr" not supported: Docutils-generated text will be in English. _________________________ test_babel_with_language_ja __________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='latex-babel', confoverrides={'language': 'ja'}) def test_babel_with_language_ja(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:499: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-babel/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{jsbook} \documentclass[letterpaper,10pt,dvipdfmx]{sphinxmanual} \ifdefine...} \label{\detokenize{bar:bar}}\label{\detokenize{bar::doc}} \renewcommand{\indexname}{索引} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-babel # outdir: /<>/tests/build/latex-babel/_build/latex # status: Running Sphinx v1.8.5 loading translations [ja]... done loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar resolving references... writing... # warning: _______________________ test_babel_with_unknown_language _______________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='latex-babel', confoverrides={'language': 'unknown'}) def test_babel_with_unknown_language(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:519: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-babel/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...label{\detokenize{bar:bar}}\label{\detokenize{bar::doc}} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-babel # outdir: /<>/tests/build/latex-babel/_build/latex # status: Running Sphinx v1.8.5 loading translations [unknown]... not available for built-in messages loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar resolving references... writing... # warning: /<>/tests/build/latex-babel/bar.rst:: WARNING: language "unknown" not supported: Docutils-generated text will be in English. WARNING: no Babel option known for language 'unknown' ______________________ test_polyglossia_with_language_de _______________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='latex-babel', confoverrides={'language': 'de', 'latex_engine': 'lualatex'}) def test_polyglossia_with_language_de(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:542: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-babel/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \IfFileExists{luatex85.sty} {\RequirePackage{luatex85}} {\ifdef...ze{bar:bar}}\label{\detokenize{bar::doc}} \renewcommand{\indexname}{Stichwortverzeichnis} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-babel # outdir: /<>/tests/build/latex-babel/_build/latex # status: Running Sphinx v1.8.5 loading translations [de]... done loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar resolving references... writing... # warning: ____________________ test_polyglossia_with_language_de_1901 ____________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='latex-babel', confoverrides={'language': 'de-1901', 'latex_engine': 'lualatex'}) def test_polyglossia_with_language_de_1901(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:564: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-babel/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \IfFileExists{luatex85.sty} {\RequirePackage{luatex85}} {\ifdef...label{\detokenize{bar:bar}}\label{\detokenize{bar::doc}} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-babel # outdir: /<>/tests/build/latex-babel/_build/latex # status: Running Sphinx v1.8.5 loading translations [de-1901]... not available for built-in messages loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar resolving references... writing... # warning: ________________________________ test_footnote _________________________________ app = status = warning = @pytest.mark.sphinx('latex') def test_footnote(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:584: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/root/_build/latex/SphinxTests.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...ref{objects:\detokenize{module-mod}} \end{sphinxtheindex} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxTests.tex...contents extapi images subdir/images subdir/includes includes markup objects bom math autodoc metadata extensions footnote lists otherext resolving references... writing... # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) WARNING: Could not fetch remote image: https://www.python.org/static/img/python-logo.png [HTTPSConnectionPool(host='www.python.org', port=443): Max retries exceeded with url: /static/img/python-logo.png (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))] _____________ test_reference_in_caption_and_codeblock_in_footnote ______________ app = status = warning = @pytest.mark.sphinx('latex', testroot='footnotes') def test_reference_in_caption_and_codeblock_in_footnote(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:611: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/footnotes/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/footnotes # outdir: /<>/tests/build/footnotes/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] baz reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index bar baz resolving references... writing... done copying images... [100%] rimg.png copying TeX support files... # warning: ________________________ test_latex_show_urls_is_inline ________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='footnotes', confoverrides={'latex_show_urls': 'inline'}) def test_latex_show_urls_is_inline(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:652: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/footnotes/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...oryear} Author, Title, Year \end{sphinxthebibliography} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/footnotes # outdir: /<>/tests/build/footnotes/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index bar baz resolving references... writing... # warning: _______________________ test_latex_show_urls_is_footnote _______________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='footnotes', confoverrides={'latex_show_urls': 'footnote'}) def test_latex_show_urls_is_footnote(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:697: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/footnotes/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...oryear} Author, Title, Year \end{sphinxthebibliography} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/footnotes # outdir: /<>/tests/build/footnotes/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index bar baz resolving references... writing... # warning: __________________________ test_latex_show_urls_is_no __________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='footnotes', confoverrides={'latex_show_urls': 'no'}) def test_latex_show_urls_is_no(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:751: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/footnotes/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...oryear} Author, Title, Year \end{sphinxthebibliography} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/footnotes # outdir: /<>/tests/build/footnotes/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index bar baz resolving references... writing... # warning: _______________ test_latex_show_urls_footnote_and_substitutions ________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='footnotes', confoverrides={'latex_show_urls': 'footnote', 'rst_prolog': '.. |URL| replace:: `text `__'}) def test_latex_show_urls_footnote_and_substitutions(app, status, warning): # hyperlinks in substitutions should not effect to make footnotes (refs: #4784) > test_latex_show_urls_is_footnote(app, status, warning) tests/test_build_latex.py:796: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_build_latex.py:697: in test_latex_show_urls_is_footnote app.builder.build_all() sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/footnotes/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...oryear} Author, Title, Year \end{sphinxthebibliography} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/footnotes # outdir: /<>/tests/build/footnotes/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] baz reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index bar baz resolving references... writing... # warning: ____________________________ test_image_in_section _____________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='image-in-section') def test_image_in_section(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:801: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/image-in-section/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/image-in-section # outdir: /<>/tests/build/image-in-section/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index resolving references... writing... done copying images... [100%] pic.png copying TeX support files... # warning: _________________________ test_latex_logo_if_not_found _________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='basic', confoverrides={'latex_logo': 'notfound.jpg'}) def test_latex_logo_if_not_found(app, status, warning): try: app.builder.build_all() assert False # SphinxError not raised except Exception as exc: > assert isinstance(exc, SphinxError) E assert False E + where False = isinstance(TypeError("'encoding' is an invalid keyword argument for this function",), SphinxError) tests/test_build_latex.py:822: AssertionError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index resolving references... writing... # warning: _________________________ test_toctree_maxdepth_manual _________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='toctree-maxdepth') def test_toctree_maxdepth_manual(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:827: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/toctree-maxdepth/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/toctree-maxdepth # outdir: /<>/tests/build/toctree-maxdepth/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 5 added, 0 changed, 0 removed reading sources... [ 20%] bar reading sources... [ 40%] baz reading sources... [ 60%] foo reading sources... [ 80%] index reading sources... [100%] qux looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar baz resolving references... writing... done copying TeX support files... # warning: /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: foo is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: bar is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst: WARNING: document isn't included in any toctree _________________________ test_toctree_maxdepth_howto __________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', confoverrides={'latex_documents': [ ('index', 'SphinxTests.tex', 'Sphinx Tests Documentation', 'Georg Brandl', 'howto'), ]}) def test_toctree_maxdepth_howto(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/toctree-maxdepth/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/toctree-maxdepth # outdir: /<>/tests/build/toctree-maxdepth/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing SphinxTests.tex...index foo bar baz resolving references... writing... done copying TeX support files... # warning: /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: foo is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: bar is already assigned section numbers (nested numbered toctree?) ____________________________ test_toctree_not_found ____________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', confoverrides={'master_doc': 'foo'}) def test_toctree_not_found(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/toctree-maxdepth/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...Foo B1} \label{\detokenize{foo:foo-b1}} should be 1.2.1 \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/toctree-maxdepth # outdir: /<>/tests/build/toctree-maxdepth/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 5 added, 0 changed, 0 removed reading sources... [ 20%] bar reading sources... [ 40%] baz reading sources... [ 60%] foo reading sources... [ 80%] index reading sources... [100%] qux looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...foo resolving references... writing... # warning: /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: foo is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: bar is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/index.rst: WARNING: document isn't included in any toctree /<>/tests/build/toctree-maxdepth/qux.rst: WARNING: document isn't included in any toctree ________________________ test_toctree_without_maxdepth _________________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', confoverrides={'master_doc': 'bar'}) def test_toctree_without_maxdepth(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:872: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/toctree-maxdepth/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...Bar B1} \label{\detokenize{bar:bar-b1}} should be 2.2.1 \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/toctree-maxdepth # outdir: /<>/tests/build/toctree-maxdepth/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 5 added, 0 changed, 0 removed reading sources... [ 20%] bar reading sources... [ 40%] baz reading sources... [ 60%] foo reading sources... [ 80%] index reading sources... [100%] qux looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...bar baz resolving references... writing... # warning: /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: foo is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: bar is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/index.rst: WARNING: document isn't included in any toctree /<>/tests/build/toctree-maxdepth/qux.rst: WARNING: document isn't included in any toctree ______________________ test_toctree_with_deeper_maxdepth _______________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', confoverrides={'master_doc': 'qux'}) def test_toctree_with_deeper_maxdepth(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:885: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/toctree-maxdepth/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...Bar B1} \label{\detokenize{bar:bar-b1}} should be 2.2.1 \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/toctree-maxdepth # outdir: /<>/tests/build/toctree-maxdepth/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 5 added, 0 changed, 0 removed reading sources... [ 20%] bar reading sources... [ 40%] baz reading sources... [ 60%] foo reading sources... [ 80%] index reading sources... [100%] qux looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...qux foo bar baz resolving references... writing... # warning: /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: foo is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: bar is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/index.rst: WARNING: document isn't included in any toctree ____________________ test_latex_toplevel_sectioning_is_None ____________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', confoverrides={'latex_toplevel_sectioning': None}) def test_latex_toplevel_sectioning_is_None(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:898: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/toctree-maxdepth/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...Bar B1} \label{\detokenize{bar:bar-b1}} should be 2.2.1 \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/toctree-maxdepth # outdir: /<>/tests/build/toctree-maxdepth/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 5 added, 0 changed, 0 removed reading sources... [ 20%] bar reading sources... [ 40%] baz reading sources... [ 60%] foo reading sources... [ 80%] index reading sources... [100%] qux looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index foo bar baz resolving references... writing... # warning: /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: foo is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: bar is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst: WARNING: document isn't included in any toctree ____________________ test_latex_toplevel_sectioning_is_part ____________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', confoverrides={'latex_toplevel_sectioning': 'part'}) def test_latex_toplevel_sectioning_is_part(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:910: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/toctree-maxdepth/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...Bar B1} \label{\detokenize{bar:bar-b1}} should be 2.2.1 \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/toctree-maxdepth # outdir: /<>/tests/build/toctree-maxdepth/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index foo bar baz resolving references... writing... # warning: /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: foo is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: bar is already assigned section numbers (nested numbered toctree?) ______________ test_latex_toplevel_sectioning_is_part_with_howto _______________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', confoverrides={'latex_toplevel_sectioning': 'part', 'latex_documents': [ ('index', 'Python.tex', 'Sphinx Tests Documentation', 'Georg Brandl', 'howto') ]}) def test_latex_toplevel_sectioning_is_part_with_howto(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:928: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/toctree-maxdepth/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{article} \documentclass[letterpaper,10pt,english]{sphinxhowto} \ifdefined...Bar B1} \label{\detokenize{bar:bar-b1}} should be 2.2.1 \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/toctree-maxdepth # outdir: /<>/tests/build/toctree-maxdepth/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index foo bar baz resolving references... writing... # warning: /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: foo is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: bar is already assigned section numbers (nested numbered toctree?) __________________ test_latex_toplevel_sectioning_is_chapter ___________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', confoverrides={'latex_toplevel_sectioning': 'chapter'}) def test_latex_toplevel_sectioning_is_chapter(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:942: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/toctree-maxdepth/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...Bar B1} \label{\detokenize{bar:bar-b1}} should be 2.2.1 \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/toctree-maxdepth # outdir: /<>/tests/build/toctree-maxdepth/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index foo bar baz resolving references... writing... # warning: /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: foo is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: bar is already assigned section numbers (nested numbered toctree?) _____________ test_latex_toplevel_sectioning_is_chapter_with_howto _____________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', confoverrides={'latex_toplevel_sectioning': 'chapter', 'latex_documents': [ ('index', 'Python.tex', 'Sphinx Tests Documentation', 'Georg Brandl', 'howto') ]}) def test_latex_toplevel_sectioning_is_chapter_with_howto(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:958: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/toctree-maxdepth/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{article} \documentclass[letterpaper,10pt,english]{sphinxhowto} \ifdefined...Bar B1} \label{\detokenize{bar:bar-b1}} should be 2.2.1 \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/toctree-maxdepth # outdir: /<>/tests/build/toctree-maxdepth/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index foo bar baz resolving references... writing... # warning: /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: foo is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: bar is already assigned section numbers (nested numbered toctree?) WARNING: unknown 'chapter' toplevel_sectioning for class 'article' __________________ test_latex_toplevel_sectioning_is_section ___________________ app = status = warning = @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', confoverrides={'latex_toplevel_sectioning': 'section'}) def test_latex_toplevel_sectioning_is_section(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:970: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/toctree-maxdepth/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...Bar B1} \label{\detokenize{bar:bar-b1}} should be 2.2.1 \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/toctree-maxdepth # outdir: /<>/tests/build/toctree-maxdepth/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index foo bar baz resolving references... writing... # warning: /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: foo is already assigned section numbers (nested numbered toctree?) /<>/tests/build/toctree-maxdepth/qux.rst:4: WARNING: bar is already assigned section numbers (nested numbered toctree?) ___________________________ test_maxlistdepth_at_ten ___________________________ app = status = warning = @skip_if_stylefiles_notfound @pytest.mark.sphinx('latex', testroot='maxlistdepth') def test_maxlistdepth_at_ten(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:981: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/maxlistdepth/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/maxlistdepth # outdir: /<>/tests/build/maxlistdepth/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxTests.tex...index resolving references... writing... done copying TeX support files... # warning: __________________________ test_latex_table_tabulars ___________________________ app = status = warning = @pytest.mark.skipif(docutils.__version_info__ < (0, 13), reason='docutils-0.13 or above is required') @pytest.mark.sphinx('latex', testroot='latex-table') @pytest.mark.test_params(shared_result='latex-table') def test_latex_table_tabulars(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:994: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/latex-table/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-table # outdir: /<>/tests/build/latex-table/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 4 added, 0 changed, 0 removed reading sources... [ 25%] complex reading sources... [ 50%] index reading sources... [ 75%] longtable reading sources... [100%] tabular looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index tabular longtable complex resolving references... writing... done copying TeX support files... # warning: __________________________ test_latex_table_longtable __________________________ app = status = warning = @pytest.mark.skipif(docutils.__version_info__ < (0, 13), reason='docutils-0.13 or above is required') @pytest.mark.sphinx('latex', testroot='latex-table') @pytest.mark.test_params(shared_result='latex-table') def test_latex_table_longtable(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1065: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-table/_build/latex/test.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{report} \ifdefined\pdfpx...ne \end{tabulary} \par \sphinxattableend\end{savenotes} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-table # outdir: /<>/tests/build/latex-table/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing test.tex...index tabular longtable complex resolving references... writing... [35mlongtable reading sources... [100%] tabular looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index tabular longtable complex resolving references... writing... done copying TeX support files... # warning: _______________________ test_latex_table_complex_tables ________________________ app = status = warning = @pytest.mark.skipif(docutils.__version_info__ < (0, 13), reason='docutils-0.13 or above is required') @pytest.mark.sphinx('latex', testroot='latex-table') @pytest.mark.test_params(shared_result='latex-table') def test_latex_table_complex_tables(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-table/_build/latex/test.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{report} \ifdefined\pdfpx...ne \end{tabulary} \par \sphinxattableend\end{savenotes} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-table # outdir: /<>/tests/build/latex-table/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing test.tex...index tabular longtable complex resolving references... writing... [35mlongtable reading sources... [100%] tabular looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index tabular longtable complex resolving references... writing... done copying TeX support files... # warning: ____________________ test_latex_table_custom_template_caseA ____________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='latex-table', confoverrides={'templates_path': ['_mytemplates/latex']}) def test_latex_table_custom_template_caseA(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-table/_build/latex/test.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{report} \ifdefined\pdfpx...ne \end{tabulary} \par \sphinxattableend\end{savenotes} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-table # outdir: /<>/tests/build/latex-table/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing test.tex...index tabular longtable complex resolving references... writing... # warning: ____________________ test_latex_table_custom_template_caseB ____________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='latex-table', confoverrides={'templates_path': ['_mytemplates']}) def test_latex_table_custom_template_caseB(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1158: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-table/_build/latex/test.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{report} \ifdefined\pdfpx...ne \end{tabulary} \par \sphinxattableend\end{savenotes} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-table # outdir: /<>/tests/build/latex-table/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing test.tex...index tabular longtable complex resolving references... writing... # warning: ____________________ test_latex_table_custom_template_caseC ____________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='latex-table') @pytest.mark.test_params(shared_result='latex-table') def test_latex_table_custom_template_caseC(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1166: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/latex-table/_build/latex/test.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{report} \ifdefined\pdfpx...ne \end{tabulary} \par \sphinxattableend\end{savenotes} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-table # outdir: /<>/tests/build/latex-table/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing test.tex...index tabular longtable complex resolving references... writing... [35mlongtable reading sources... [100%] tabular looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index tabular longtable complex resolving references... writing... done copying TeX support files... # warning: ___________________________ test_latex_raw_directive ___________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='directives-raw') def test_latex_raw_directive(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/directives-raw/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/directives-raw # outdir: /<>/tests/build/directives-raw/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index resolving references... writing... done copying TeX support files... # warning: _______________________________ test_latex_index _______________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='latex-index') def test_latex_index(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1213: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/latex-index/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-index # outdir: /<>/tests/build/latex-index/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index resolving references... writing... done copying TeX support files... # warning: _____________________________ test_latex_equations _____________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='latex-equations') def test_latex_equations(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/latex-equations/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-equations # outdir: /<>/tests/build/latex-equations/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] equations looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...equations resolving references... writing... done copying TeX support files... # warning: ______________________ test_latex_image_in_parsed_literal ______________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='image-in-parsed-literal') def test_latex_image_in_parsed_literal(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1237: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/image-in-parsed-literal/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/image-in-parsed-literal # outdir: /<>/tests/build/image-in-parsed-literal/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index resolving references... writing... done copying images... [100%] pic.png copying TeX support files... # warning: ______________________ test_latex_nested_enumerated_list _______________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='nested-enumerated-list') def test_latex_nested_enumerated_list(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1247: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/nested-enumerated-list/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/nested-enumerated-list # outdir: /<>/tests/build/nested-enumerated-list/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index resolving references... writing... done copying TeX support files... # warning: __________________________ test_latex_thebibliography __________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='footnotes') def test_latex_thebibliography(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1274: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/footnotes/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...oryear} Author, Title, Year \end{sphinxthebibliography} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/footnotes # outdir: /<>/tests/build/footnotes/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] baz reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index bar baz resolving references... writing... # warning: _____________________________ test_latex_glossary ______________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='glossary') def test_latex_glossary(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1287: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/glossary/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/glossary # outdir: /<>/tests/build/glossary/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index resolving references... writing... done copying TeX support files... # warning: ______________________________ test_latex_labels _______________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='latex-labels') def test_latex_labels(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1311: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/latex-labels/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/latex-labels # outdir: /<>/tests/build/latex-labels/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] index reading sources... [100%] otherdoc looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index otherdoc resolving references... writing... done copying TeX support files... # warning: /<>/tests/build/latex-labels/index.rst:12: WARNING: image file not readable: logo.jpg /<>/tests/build/latex-labels/index.rst:: WARNING: image file not readable: logo.jpg _____________________________ test_index_on_title ______________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='index_on_title') def test_index_on_title(app, status, warning): > app.builder.build_all() tests/test_build_latex.py:1359: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/index_on_title/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/index_on_title # outdir: /<>/tests/build/index_on_title/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] contents looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...contents resolving references... writing... done copying TeX support files... # warning: ___________________________________ test_all ___________________________________ app = status = warning = @pytest.mark.sphinx('man') def test_all(app, status, warning): app.builder.build_all() assert (app.outdir / 'SphinxTests.1').exists() > content = (app.outdir / 'SphinxTests.1').text() tests/test_build_manpage.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/root/_build/man/SphinxTests.1') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: man # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/man # status: Running Sphinx v1.8.5 loading pickled environment... done building [man]: all source files updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done writing... SphinxTests.1 { extapi images subdir/images subdir/includes includes markup objects bom math autodoc metadata extensions footnote lists otherext } # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) __________________________ test_captioned_code_block ___________________________ app = status = warning = @pytest.mark.sphinx('man', testroot='directive-code') def test_captioned_code_block(app, status, warning): app.builder.build_all() > content = (app.outdir / 'python.1').text() tests/test_build_manpage.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/directive-code/_build/man/python.1') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: man # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/man # status: Running Sphinx v1.8.5 building [man]: all source files updating environment: 8 added, 0 changed, 0 removed reading sources... [ 12%] caption reading sources... [ 25%] classes reading sources... [ 37%] emphasize reading sources... [ 50%] index reading sources... [ 62%] linenos reading sources... [ 75%] namedblocks reading sources... [ 87%] py-decorators reading sources... [100%] python looking for now-outdated files... none found pickling environment... done checking consistency... done writing... python.1 { caption classes emphasize linenos namedblocks py-decorators python } # warning: /<>/tests/build/directive-code/caption.rst:26: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/caption.rst:47: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/classes.rst:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/emphasize.rst:4: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/index.rst:24: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/linenos.rst:4: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/linenos.rst:8: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/linenos.rst:12: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/linenos.rst:17: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/namedblocks.rst:25: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/py-decorators.rst:7: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/py-decorators.rst:11: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/py-decorators.rst:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/python.rst:8: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/python.rst:11: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/directive-code/caption.rst:7: WARNING: undefined label: name **test** py /<>/tests/build/directive-code/caption.rst:9: WARNING: undefined label: name **test** py (if the link has no caption the label must precede a section header) /<>/tests/build/directive-code/namedblocks.rst:7: WARNING: undefined label: some python code (if the link has no caption the label must precede a section header) ______________________________ test_qthelp_basic _______________________________ app = status = warning = @pytest.mark.sphinx('qthelp', testroot='basic') def test_qthelp_basic(app, status, warning): > app.builder.build_all() tests/test_build_qthelp.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'index' addctx = {'body': '

The basic Sphinx documentation for...rings
  • Setuptools integration
  • ', 'display_toc': True, 'meta': {}, 'metatags': '', ...} templatename = 'page.html' outfilename = '/<>/tests/build/basic/_build/qthelp/index.html' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: qthelp # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/qthelp # status: Running Sphinx v1.8.5 loading pickled environment... done building [qthelp]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [100%] index # warning: _____________________________ test_qthelp_escaped ______________________________ app = status = warning = @pytest.mark.sphinx('qthelp', testroot='need-escaped') def test_qthelp_escaped(app, status, warning): > app.builder.build_all() tests/test_build_qthelp.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'bar' addctx = {'body': '

    2. bar

    ', 'display_toc': False, 'meta': {}, 'metatags': '', ...} templatename = 'page.html' outfilename = '/<>/tests/build/need-escaped/_build/qthelp/bar.html' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: qthelp # srcdir: /<>/tests/build/need-escaped # outdir: /<>/tests/build/need-escaped/_build/qthelp # status: Running Sphinx v1.8.5 building [qthelp]: all source files updating environment: 6 added, 0 changed, 0 removed reading sources... [ 16%] bar reading sources... [ 33%] baz reading sources... [ 50%] foo reading sources... [ 66%] index reading sources... [ 83%] quux reading sources... [100%] qux looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 16%] bar # warning: ____________________________ test_qthelp_namespace _____________________________ app = status = warning = @pytest.mark.sphinx('qthelp', testroot='basic') def test_qthelp_namespace(app, status, warning): # default namespace > app.builder.build_all() tests/test_build_qthelp.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'index' addctx = {'body': '

    The basic Sphinx documentation for...rings
  • Setuptools integration
  • ', 'display_toc': True, 'meta': {}, 'metatags': '', ...} templatename = 'page.html' outfilename = '/<>/tests/build/basic/_build/qthelp/index.html' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: qthelp # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/qthelp # status: Running Sphinx v1.8.5 loading pickled environment... done building [qthelp]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [100%] index # warning: ______________________________ test_qthelp_title _______________________________ app = status = warning = @pytest.mark.sphinx('qthelp', testroot='basic') def test_qthelp_title(app, status, warning): # default title > app.builder.build_all() tests/test_build_qthelp.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) sphinx/builders/html.py:736: in write_doc self.handle_page(docname, ctx, event_arg=doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pagename = 'index' addctx = {'body': '

    The basic Sphinx documentation for...rings
  • Setuptools integration
  • ', 'display_toc': True, 'meta': {}, 'metatags': '', ...} templatename = 'page.html' outfilename = '/<>/tests/build/basic/_build/qthelp/index.html' event_arg = > def handle_page(self, pagename, addctx, templatename='page.html', outfilename=None, event_arg=None): # type: (unicode, Dict, unicode, unicode, Any) -> None ctx = self.globalcontext.copy() # current_page_name is backwards compatibility ctx['pagename'] = ctx['current_page_name'] = pagename ctx['encoding'] = self.config.html_output_encoding default_baseuri = self.get_target_uri(pagename) # in the singlehtml builder, default_baseuri still contains an #anchor # part, which relative_uri doesn't really like... default_baseuri = default_baseuri.rsplit('#', 1)[0] if self.config.html_baseurl: ctx['pageurl'] = posixpath.join(self.config.html_baseurl, pagename + self.out_suffix) else: ctx['pageurl'] = None def pathto(otheruri, resource=False, baseuri=default_baseuri): # type: (unicode, bool, unicode) -> unicode if resource and '://' in otheruri: # allow non-local resources given by scheme return otheruri elif not resource: otheruri = self.get_target_uri(otheruri) uri = relative_uri(baseuri, otheruri) or '#' if uri == '#' and not self.allow_sharp_as_current_path: uri = baseuri return uri ctx['pathto'] = pathto def css_tag(css): # type: (Stylesheet) -> unicode attrs = [] for key in sorted(css.attributes): value = css.attributes[key] if value is not None: attrs.append('%s="%s"' % (key, htmlescape(value, True))) attrs.append('href="%s"' % pathto(css.filename, resource=True)) return '' % ' '.join(attrs) ctx['css_tag'] = css_tag def hasdoc(name): # type: (unicode) -> bool if name in self.env.all_docs: return True elif name == 'search' and self.search: return True elif name == 'genindex' and self.get_builder_config('use_index', 'html'): return True return False ctx['hasdoc'] = hasdoc def warn(*args, **kwargs): # type: (Any, Any) -> unicode """Simple warn() wrapper for themes.""" warnings.warn('The template function warn() was deprecated. ' 'Use warning() instead.', RemovedInSphinx30Warning, stacklevel=2) self.warn(*args, **kwargs) return '' # return empty string ctx['warn'] = warn ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) self.add_sidebars(pagename, ctx) ctx.update(addctx) self.update_page_context(pagename, templatename, ctx, event_arg) newtmpl = self.app.emit_firstresult('html-page-context', pagename, templatename, ctx, event_arg) if newtmpl: templatename = newtmpl try: output = self.templates.render(templatename, ctx) except UnicodeError: logger.warning(__("a Unicode error occurred when rendering the page %s. " "Please make sure all config values that contain " "non-ASCII content are Unicode strings."), pagename) return except Exception as exc: raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % (pagename, exc)) if not outfilename: outfilename = self.get_outfilename(pagename) # outfilename's path is in general different from self.outdir ensuredir(path.dirname(outfilename)) try: with open(outfilename, 'w', # type: ignore > encoding=ctx['encoding'], errors='xmlcharrefreplace') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/builders/html.py:1196: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: qthelp # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/qthelp # status: Running Sphinx v1.8.5 loading pickled environment... done building [qthelp]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [100%] index # warning: ____________________________ test_texinfo_warnings _____________________________ app = status = warning = @pytest.mark.sphinx('texinfo', testroot='warnings', freshenv=True) def test_texinfo_warnings(app, status, warning): app.builder.build_all() warnings = strip_escseq(re.sub(re.escape(os.sep) + '{1,2}', '/', warning.getvalue())) warnings_exp = TEXINFO_WARNINGS % { 'root': re.escape(app.srcdir.replace(os.sep, '/'))} > assert re.match(warnings_exp + '$', warnings), \ 'Warnings don\'t match:\n' + \ '--- Expected (regex):\n' + warnings_exp + \ '--- Got:\n' + warnings E AssertionError: Warnings don't match: E --- Expected (regex): E \/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:\d+: WARNING: Explicit markup ends without a blank line; unexpected unindent. E \/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/index.rst:\d+: WARNING: Encoding 'utf-8-sig' used for reading included file u'\/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/wrongenc.inc' seems to be wrong, try giving an :encoding: option E \/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/index.rst:\d+: WARNING: image file not readable: foo.png E \/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/index.rst:\d+: WARNING: download file not readable: \/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/nonexisting.png E \/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/index.rst:\d+: WARNING: invalid single index entry u'' E \/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/undecodable.rst:\d+: WARNING: undecodable source characters, replacing with "\?": b?'here: >>>(\\|/)xbb<<<((\\|/)r)?' E \/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/index.rst:\d+: WARNING: unknown option: &option E \/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/index.rst:\d+: WARNING: citation not found: missing E \/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/index.rst:\d+: WARNING: a suitable image for texinfo builder not found: foo.\* E \/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/index.rst:\d+: WARNING: a suitable image for texinfo builder not found: \['application/pdf', 'image/svg\+xml'\] \(svgimg.\*\) E --- Got: E /<>/tests/build/warnings/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. E /<>/tests/build/warnings/index.rst:19: WARNING: file() takes at most 3 arguments (4 given) E /<>/tests/build/warnings/index.rst:11: WARNING: image file not readable: foo.png E /<>/tests/build/warnings/index.rst:24: WARNING: download file not readable: /<>/tests/build/warnings/nonexisting.png E /<>/tests/build/warnings/index.rst:27: WARNING: invalid single index entry u'' E /<>/tests/build/warnings/undecodable.rst:3: WARNING: undecodable source characters, replacing with "?": 'here: >>>\xbb<<<' E /<>/tests/build/warnings/index.rst:41: WARNING: unknown option: &option E /<>/tests/build/warnings/index.rst:45: WARNING: citation not found: missing E /<>/tests/build/warnings/index.rst:14: WARNING: a suitable image for texinfo builder not found: foo.* E /<>/tests/build/warnings/index.rst:17: WARNING: a suitable image for texinfo builder not found: ['application/pdf', 'image/svg+xml'] (svgimg.*) E E assert None E + where None = (("\/build\/sphinx\-4XqbH3\/sphinx\-1\.8\.5\/tests\/build\/warnings/autodoc_fodder.py:docstring of autodoc_fodder.Markup...t:\d+: WARNING: a suitable image for texinfo builder not found: \['application/pdf', 'image/svg\+xml'\] \(svgimg.\*\)\n" + '$'), "/<>/tests/build/warnings/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: W...ndex.rst:17: WARNING: a suitable image for texinfo builder not found: ['application/pdf', 'image/svg+xml'] (svgimg.*)\n") E + where = re.match tests/test_build_texinfo.py:45: AssertionError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: texinfo # srcdir: /<>/tests/build/warnings # outdir: /<>/tests/build/warnings/_build/texinfo # status: Running Sphinx v1.8.5 building [texinfo]: all source files updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] index reading sources... [100%] undecodable looking for now-outdated files... none found pickling environment... done checking consistency... done processing python.texi...index resolving references... writing... done copying Texinfo support files... /<>/tests/build/warnings/_build/texinfo/Makefile done # warning: /<>/tests/build/warnings/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/warnings/index.rst:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/warnings/index.rst:11: WARNING: image file not readable: foo.png /<>/tests/build/warnings/index.rst:24: WARNING: download file not readable: /<>/tests/build/warnings/nonexisting.png /<>/tests/build/warnings/index.rst:27: WARNING: invalid single index entry u'' /<>/tests/build/warnings/undecodable.rst:3: WARNING: undecodable source characters, replacing with "?": 'here: >>>\xbb<<<' /<>/tests/build/warnings/index.rst:41: WARNING: unknown option: &option /<>/tests/build/warnings/index.rst:45: WARNING: citation not found: missing /<>/tests/build/warnings/index.rst:14: WARNING: a suitable image for texinfo builder not found: foo.* /<>/tests/build/warnings/index.rst:17: WARNING: a suitable image for texinfo builder not found: ['application/pdf', 'image/svg+xml'] (svgimg.*) _________________________________ test_texinfo _________________________________ app = status = warning = @pytest.mark.sphinx('texinfo') def test_texinfo(app, status, warning): TexinfoTranslator.ignore_missing_images = True app.builder.build_all() > result = (app.outdir / 'SphinxTests.texi').text(encoding='utf8') tests/test_build_texinfo.py:55: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/root/_build/texinfo/SphinxTests.texi') encoding = 'utf8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: texinfo # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/texinfo # status: Running Sphinx v1.8.5 loading pickled environment... done building [texinfo]: all source files updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done processing SphinxTests.texi...contents extapi images subdir/images subdir/includes includes markup objects bom math autodoc metadata extensions footnote lists otherext resolving references... writing... done copying images... [ 16%] img.foo.png copying images... [ 33%] img.png copying images... [ 50%] subdir/simg.png copying images... [ 66%] subdir/img.png copying images... [ 83%] ../root/img.png copying images... [100%] rimg.png copying Texinfo support files... /<>/tests/build/root/_build/texinfo/Makefile done # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) WARNING: Could not fetch remote image: https://www.python.org/static/img/python-logo.png [HTTPSConnectionPool(host='www.python.org', port=443): Max retries exceeded with url: /static/img/python-logo.png (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))] /<>/tests/build/root/images.txt:26: WARNING: a suitable image for texinfo builder not found: ['application/pdf', 'image/svg+xml'] (svgimg.*) /<>/tests/build/root/objects.txt:1: WARNING: unknown node type: > /<>/tests/build/root/objects.txt:213: WARNING: unknown node type: <#text: ' '><#text: '&'> /<>/tests/build/root/objects.txt:213: WARNING: unknown node type: <#text: ' '><#text: 'T'><#text: ' '> ...> _____________________________ test_texinfo_rubric ______________________________ app = status = warning = @pytest.mark.sphinx('texinfo', testroot='markup-rubric') def test_texinfo_rubric(app, status, warning): app.build() > output = (app.outdir / 'python.texi').text() tests/test_build_texinfo.py:83: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/markup-rubric/_build/texinfo/python.texi') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: texinfo # srcdir: /<>/tests/build/markup-rubric # outdir: /<>/tests/build/markup-rubric/_build/texinfo # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [texinfo]: all documents updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing python.texi...index resolving references... writing... done copying Texinfo support files... /<>/tests/build/markup-rubric/_build/texinfo/Makefile done build succeeded. The Texinfo files are in ../../../tests/build/markup-rubric/_build/texinfo. Run 'make' in that directory to run these through makeinfo (use 'make info' here to do that automatically). # warning: ____________________________ test_texinfo_citation _____________________________ app = status = warning = @pytest.mark.sphinx('texinfo', testroot='markup-citation') def test_texinfo_citation(app, status, warning): app.builder.build_all() > output = (app.outdir / 'python.texi').text() tests/test_build_texinfo.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/markup-citation/_build/texinfo/python.texi') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: texinfo # srcdir: /<>/tests/build/markup-citation # outdir: /<>/tests/build/markup-citation/_build/texinfo # status: Running Sphinx v1.8.5 building [texinfo]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing python.texi...index resolving references... writing... done copying Texinfo support files... /<>/tests/build/markup-citation/_build/texinfo/Makefile done # warning: __________________________ test_maxwitdh_with_prefix ___________________________ app = status = warning = @with_text_app() def test_maxwitdh_with_prefix(app, status, warning): > app.builder.build_update() tests/test_build_text.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/build-text # outdir: /<>/tests/build/build-text/_build/text # status: Running Sphinx v1.8.5 building [text]: targets for 10 source files that are out of date updating environment: 10 added, 0 changed, 0 removed reading sources... [ 10%] contents reading sources... [ 20%] doc1 reading sources... [ 30%] doc2 reading sources... [ 40%] lineblock reading sources... [ 50%] listitems reading sources... [ 60%] maxwidth reading sources... [ 70%] nonascii_maxwidth reading sources... [ 80%] nonascii_table reading sources... [ 90%] nonascii_title reading sources... [100%] table looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 10%] contents # warning: /<>/tests/build/build-text/listitems.txt: WARNING: document isn't included in any toctree /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'lineblock' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_table' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'table' that doesn't have a title: no link will be generated ________________________________ test_lineblock ________________________________ app = status = warning = @with_text_app() def test_lineblock(app, status, warning): # regression test for #1109: need empty line after line block > app.builder.build_update() tests/test_build_text.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/build-text # outdir: /<>/tests/build/build-text/_build/text # status: Running Sphinx v1.8.5 loading pickled environment... done building [text]: targets for 10 source files that are out of date updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [ 10%] contents # warning: /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'lineblock' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_table' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'table' that doesn't have a title: no link will be generated ___________________________ test_nonascii_title_line ___________________________ app = status = warning = @with_text_app() def test_nonascii_title_line(app, status, warning): > app.builder.build_update() tests/test_build_text.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/build-text # outdir: /<>/tests/build/build-text/_build/text # status: Running Sphinx v1.8.5 loading pickled environment... done building [text]: targets for 10 source files that are out of date updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [ 10%] contents # warning: /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'lineblock' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_table' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'table' that doesn't have a title: no link will be generated _____________________________ test_nonascii_table ______________________________ app = status = warning = @with_text_app() def test_nonascii_table(app, status, warning): > app.builder.build_update() tests/test_build_text.py:74: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/build-text # outdir: /<>/tests/build/build-text/_build/text # status: Running Sphinx v1.8.5 loading pickled environment... done building [text]: targets for 10 source files that are out of date updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [ 10%] contents # warning: /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'lineblock' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_table' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'table' that doesn't have a title: no link will be generated ____________________________ test_nonascii_maxwidth ____________________________ app = status = warning = @with_text_app() def test_nonascii_maxwidth(app, status, warning): > app.builder.build_update() tests/test_build_text.py:83: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/build-text # outdir: /<>/tests/build/build-text/_build/text # status: Running Sphinx v1.8.5 loading pickled environment... done building [text]: targets for 10 source files that are out of date updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [ 10%] contents # warning: /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'lineblock' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_table' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'table' that doesn't have a title: no link will be generated __________________________ test_table_with_empty_cell __________________________ app = status = warning = @with_text_app() def test_table_with_empty_cell(app, status, warning): > app.builder.build_update() tests/test_build_text.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/build-text # outdir: /<>/tests/build/build-text/_build/text # status: Running Sphinx v1.8.5 loading pickled environment... done building [text]: targets for 10 source files that are out of date updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [ 10%] contents # warning: /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'lineblock' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_table' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'table' that doesn't have a title: no link will be generated ________________________ test_list_items_in_admonition _________________________ app = status = warning = @with_text_app() def test_list_items_in_admonition(app, status, warning): > app.builder.build_update() tests/test_build_text.py:106: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/build-text # outdir: /<>/tests/build/build-text/_build/text # status: Running Sphinx v1.8.5 loading pickled environment... done building [text]: targets for 10 source files that are out of date updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [ 10%] contents # warning: /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'lineblock' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_table' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'table' that doesn't have a title: no link will be generated _________________________________ test_secnums _________________________________ app = status = warning = @with_text_app() def test_secnums(app, status, warning): > app.builder.build_all() tests/test_build_text.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/build-text # outdir: /<>/tests/build/build-text/_build/text # status: Running Sphinx v1.8.5 loading pickled environment... done building [text]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [ 10%] contents # warning: /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'lineblock' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_table' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'nonascii_maxwidth' that doesn't have a title: no link will be generated /<>/tests/build/build-text/contents.txt:1: WARNING: toctree contains reference to document u'table' that doesn't have a title: no link will be generated ___________________________ test_incremental_reading ___________________________ app = @pytest.mark.sphinx('dummy', srcdir="test_builder") def test_incremental_reading(app): # first reading updated = app.builder.read() assert set(updated) == app.env.found_docs == set(app.env.all_docs) # test if exclude_patterns works ok assert 'subdir/excluded' not in app.env.found_docs # before second reading, add, modify and remove source files > (app.srcdir / 'new.txt').write_text('New file\n========\n') tests/test_builder.py:24: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/test_builder/new.txt') text = 'New file ======== ', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: dummy # srcdir: /<>/tests/build/test_builder # outdir: /<>/tests/build/test_builder/_build/dummy # status: Running Sphinx v1.8.5 updating environment: 16 added, 0 changed, 0 removed reading sources... [ 6%] autodoc reading sources... [ 12%] bom reading sources... [ 18%] contents reading sources... [ 25%] extapi reading sources... [ 31%] extensions reading sources... [ 37%] footnote reading sources... [ 43%] images reading sources... [ 50%] includes reading sources... [ 56%] lists reading sources... [ 62%] markup reading sources... [ 68%] math reading sources... [ 75%] metadata reading sources... [ 81%] objects reading sources... [ 87%] otherext reading sources... [ 93%] subdir/images reading sources... [100%] subdir/includes # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/test_builder/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/test_builder/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/test_builder/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/includes.txt:4: WARNING: download file not readable: /<>/tests/build/test_builder/nonexisting.png /<>/tests/build/test_builder/subdir/includes.txt:5: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_builder/subdir/includes.txt:9: WARNING: file() takes at most 3 arguments (4 given) _____________________________ test_errors_warnings _____________________________ logger = tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_errors_warnings0') @mock.patch("sphinx.config.logger") def test_errors_warnings(logger, tempdir): # test the error for syntax errors in the config file > (tempdir / 'conf.py').write_text(u'project = \n', encoding='ascii') tests/test_config.py:125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_errors_warnings0/conf.py') text = 'project = ', encoding = 'ascii', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError _____________________ test_errors_if_setup_is_not_callable _____________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_errors_if_setup_is_not_ca0') make_app = def test_errors_if_setup_is_not_callable(tempdir, make_app): # test the error to call setup() in the config file > (tempdir / 'conf.py').write_text(u'setup = 1') tests/test_config.py:155: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_errors_if_setup_is_not_ca0/conf.py') text = 'setup = 1', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError _______________________ test_correct_year[expect_date0] ________________________ expect_date = '2006-2009', app = @pytest.mark.sphinx('html', testroot='correct-year') def test_correct_year(expect_date, app): > app.build() tests/test_correct_year.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['contents']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/correct-year # outdir: /<>/tests/build/correct-year/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] contents looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_correct_year[expect_date1] ________________________ expect_date = '2006-2011', app = @pytest.mark.sphinx('html', testroot='correct-year') def test_correct_year(expect_date, app): > app.build() tests/test_correct_year.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['contents']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/correct-year # outdir: /<>/tests/build/correct-year/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] contents looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_correct_year[expect_date2] ________________________ expect_date = '2006-2010', app = @pytest.mark.sphinx('html', testroot='correct-year') def test_correct_year(expect_date, app): > app.build() tests/test_correct_year.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['contents']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/correct-year # outdir: /<>/tests/build/correct-year/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] contents looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________________ test_LiteralIncludeReader ___________________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader(literal_inc_path): options = {'lineno-match': True} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:38: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError ____________________ test_LiteralIncludeReader_lineno_start ____________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_lineno_start(literal_inc_path): options = {'lineno-start': 5} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError _____________________ test_LiteralIncludeReader_pyobject1 ______________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_pyobject1(literal_inc_path): options = {'lineno-match': True, 'pyobject': 'Foo'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:58: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError _____________________ test_LiteralIncludeReader_pyobject2 ______________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_pyobject2(literal_inc_path): options = {'pyobject': 'Bar'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError _____________________ test_LiteralIncludeReader_pyobject3 ______________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_pyobject3(literal_inc_path): options = {'pyobject': 'Bar.baz'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError _________________ test_LiteralIncludeReader_pyobject_and_lines _________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_pyobject_and_lines(literal_inc_path): options = {'pyobject': 'Bar', 'lines': '2-'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError _______________________ test_LiteralIncludeReader_lines1 _______________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_lines1(literal_inc_path): options = {'lines': '1-4'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:97: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError _______________________ test_LiteralIncludeReader_lines2 _______________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_lines2(literal_inc_path): options = {'lines': '1,4,6'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError ______________ test_LiteralIncludeReader_lines_and_lineno_match1 _______________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_lines_and_lineno_match1(literal_inc_path): options = {'lines': '4-6', 'lineno-match': True} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError ______________ test_LiteralIncludeReader_lines_and_lineno_match2 _______________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') app = status = warning = @pytest.mark.sphinx() # init locale for errors def test_LiteralIncludeReader_lines_and_lineno_match2(literal_inc_path, app, status, warning): options = {'lines': '1,4,6', 'lineno-match': True} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) with pytest.raises(ValueError): > content, lines = reader.read() tests/test_directive_code.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done # warning: ______________ test_LiteralIncludeReader_lines_and_lineno_match3 _______________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') app = status = warning = @pytest.mark.sphinx() # init locale for errors def test_LiteralIncludeReader_lines_and_lineno_match3(literal_inc_path, app, status, warning): options = {'lines': '100-', 'lineno-match': True} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) with pytest.raises(ValueError): > content, lines = reader.read() tests/test_directive_code.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done # warning: ______________________ test_LiteralIncludeReader_start_at ______________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_start_at(literal_inc_path): options = {'lineno-match': True, 'start-at': 'Foo', 'end-at': 'Bar'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:145: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError ____________________ test_LiteralIncludeReader_start_after _____________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_start_after(literal_inc_path): options = {'lineno-match': True, 'start-after': 'Foo', 'end-before': 'Bar'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:157: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError _______________ test_LiteralIncludeReader_start_after_and_lines ________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_start_after_and_lines(literal_inc_path): options = {'lineno-match': True, 'lines': '6-', 'start-after': 'coding', 'end-before': 'comment'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:168: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError _________________ test_LiteralIncludeReader_start_at_and_lines _________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_start_at_and_lines(literal_inc_path): options = {'lines': '2, 3, 5', 'start-at': 'foo', 'end-before': '#'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:181: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError _______________ test_LiteralIncludeReader_missing_start_and_end ________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') def test_LiteralIncludeReader_missing_start_and_end(literal_inc_path): options = {'start-at': 'NOTHING'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) with pytest.raises(ValueError): > content, lines = reader.read() tests/test_directive_code.py:192: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError ______________________ test_LiteralIncludeReader_prepend _______________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_prepend(literal_inc_path): options = {'lines': '1', 'prepend': 'Hello', 'append': 'Sphinx'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:214: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError _______________________ test_LiteralIncludeReader_dedent _______________________ literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_dedent(literal_inc_path): # dedent: 2 options = {'lines': '10-12', 'dedent': 2} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:225: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError ______________________ test_LiteralIncludeReader_tabwidth ______________________ testroot = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_tabwidth(testroot): # tab-width: 4 options = {'tab-width': 4, 'pyobject': 'Qux'} reader = LiteralIncludeReader(testroot / 'target.py', options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:252: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/target.py') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError __________________ test_LiteralIncludeReader_tabwidth_dedent ___________________ testroot = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_tabwidth_dedent(testroot): options = {'tab-width': 4, 'dedent': 4, 'pyobject': 'Qux.quux'} reader = LiteralIncludeReader(testroot / 'target.py', options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:270: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:241: in read lines = self.read_file(self.filename, location=location) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/target.py') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError ________________________ test_LiteralIncludeReader_diff ________________________ testroot = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code') literal_inc_path = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_LiteralIncludeReader_diff(testroot, literal_inc_path): options = {'diff': testroot / 'literal-diff.inc'} reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG) > content, lines = reader.read() tests/test_directive_code.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/directives/code.py:232: in read lines = self.show_diff() sphinx/directives/code.py:249: in show_diff new_lines = self.read_file(self.filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = path(u'/<>/.pybuild/cpython2_2.7/build/tests/roots/test-directive-code/literal.inc') location = None def read_file(self, filename, location=None): # type: (unicode, Any) -> List[unicode] try: with open(filename, 'r', # type: ignore > encoding=self.encoding, errors='strict') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/directives/code.py:216: TypeError _______________________________ test_code_block ________________________________ app = status = warning = @pytest.mark.sphinx('xml', testroot='directive-code') def test_code_block(app, status, warning): > app.builder.build('index') tests/test_directive_code.py:297: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'index', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/xml # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [100%] index # warning: _________________________ test_code_block_caption_html _________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='directive-code') def test_code_block_caption_html(app, status, warning): > app.builder.build(['caption']) tests/test_directive_code.py:313: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['caption', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: ________________________ test_code_block_caption_latex _________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='directive-code') def test_code_block_caption_latex(app, status, warning): > app.builder.build_all() tests/test_directive_code.py:325: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/directive-code/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index caption classes emphasize linenos namedblocks py-decorators python resolving references... writing... done copying TeX support files... # warning: /<>/tests/build/directive-code/caption.rst:7: WARNING: undefined label: name **test** py /<>/tests/build/directive-code/caption.rst:9: WARNING: undefined label: name **test** py (if the link has no caption the label must precede a section header) /<>/tests/build/directive-code/namedblocks.rst:7: WARNING: undefined label: some python code (if the link has no caption the label must precede a section header) _______________________ test_code_block_namedlink_latex ________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='directive-code') def test_code_block_namedlink_latex(app, status, warning): > app.builder.build_all() tests/test_directive_code.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/directive-code/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...al Includes} \label{\detokenize{index:literal-includes}} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index caption classes emphasize linenos namedblocks py-decorators python resolving references... writing... # warning: /<>/tests/build/directive-code/caption.rst:7: WARNING: undefined label: name **test** py /<>/tests/build/directive-code/caption.rst:9: WARNING: undefined label: name **test** py (if the link has no caption the label must precede a section header) /<>/tests/build/directive-code/namedblocks.rst:7: WARNING: undefined label: some python code (if the link has no caption the label must precede a section header) _______________________ test_code_block_emphasize_latex ________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='directive-code') def test_code_block_emphasize_latex(app, status, warning): > app.builder.build(['emphasize']) tests/test_directive_code.py:355: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/directive-code/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...al Includes} \label{\detokenize{index:literal-includes}} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index caption classes emphasize linenos namedblocks py-decorators python resolving references... writing... # warning: /<>/tests/build/directive-code/caption.rst:7: WARNING: undefined label: name **test** py /<>/tests/build/directive-code/caption.rst:9: WARNING: undefined label: name **test** py (if the link has no caption the label must precede a section header) /<>/tests/build/directive-code/namedblocks.rst:7: WARNING: undefined label: some python code (if the link has no caption the label must precede a section header) _____________________________ test_literal_include _____________________________ app = status = warning = @pytest.mark.sphinx('xml', testroot='directive-code') def test_literal_include(app, status, warning): > app.builder.build(['index']) tests/test_directive_code.py:365: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'index', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/xml # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [100%] index # warning: ____________ test_literal_include_block_start_with_comment_or_brank ____________ app = status = warning = @pytest.mark.sphinx('xml', testroot='directive-code') def test_literal_include_block_start_with_comment_or_brank(app, status, warning): > app.builder.build(['python']) tests/test_directive_code.py:377: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'index', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/xml # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [ 50%] index # warning: _________________________ test_literal_include_linenos _________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='directive-code') def test_literal_include_linenos(app, status, warning): > app.builder.build(['linenos']) tests/test_directive_code.py:401: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'linenos']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: _________________ test_literalinclude_file_whole_of_emptyline __________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='directive-code') def test_literalinclude_file_whole_of_emptyline(app, status, warning): > app.builder.build_all() tests/test_directive_code.py:449: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/directive-code/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...al Includes} \label{\detokenize{index:literal-includes}} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index caption classes emphasize linenos namedblocks py-decorators python resolving references... writing... # warning: /<>/tests/build/directive-code/caption.rst:7: WARNING: undefined label: name **test** py /<>/tests/build/directive-code/caption.rst:9: WARNING: undefined label: name **test** py (if the link has no caption the label must precede a section header) /<>/tests/build/directive-code/namedblocks.rst:7: WARNING: undefined label: some python code (if the link has no caption the label must precede a section header) _______________________ test_literalinclude_caption_html _______________________ app = status = warning = @pytest.mark.sphinx('html', testroot='directive-code') def test_literalinclude_caption_html(app, status, warning): > app.builder.build('index') tests/test_directive_code.py:463: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: ______________________ test_literalinclude_caption_latex _______________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='directive-code') def test_literalinclude_caption_latex(app, status, warning): > app.builder.build('index') tests/test_directive_code.py:475: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/directive-code/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...al Includes} \label{\detokenize{index:literal-includes}} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index caption classes emphasize linenos namedblocks py-decorators python resolving references... writing... # warning: /<>/tests/build/directive-code/caption.rst:7: WARNING: undefined label: name **test** py /<>/tests/build/directive-code/caption.rst:9: WARNING: undefined label: name **test** py (if the link has no caption the label must precede a section header) /<>/tests/build/directive-code/namedblocks.rst:7: WARNING: undefined label: some python code (if the link has no caption the label must precede a section header) _____________________ test_literalinclude_namedlink_latex ______________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='directive-code') def test_literalinclude_namedlink_latex(app, status, warning): > app.builder.build('index') tests/test_directive_code.py:488: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/directive-code/_build/latex/Python.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined...al Includes} \label{\detokenize{index:literal-includes}} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index caption classes emphasize linenos namedblocks py-decorators python resolving references... writing... # warning: /<>/tests/build/directive-code/caption.rst:7: WARNING: undefined label: name **test** py /<>/tests/build/directive-code/caption.rst:9: WARNING: undefined label: name **test** py (if the link has no caption the label must precede a section header) /<>/tests/build/directive-code/namedblocks.rst:7: WARNING: undefined label: some python code (if the link has no caption the label must precede a section header) _________________________ test_literalinclude_classes __________________________ app = status = warning = @pytest.mark.sphinx('xml', testroot='directive-code') def test_literalinclude_classes(app, status, warning): > app.builder.build(['classes']) tests/test_directive_code.py:505: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'classes', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/xml # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [ 50%] classes # warning: _______________________ test_literalinclude_pydecorators _______________________ app = status = warning = @pytest.mark.sphinx('xml', testroot='directive-code') def test_literalinclude_pydecorators(app, status, warning): > app.builder.build(['py-decorators']) tests/test_directive_code.py:522: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'index', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/directive-code # outdir: /<>/tests/build/directive-code/_build/xml # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [ 50%] index # warning: _______________________________ test_sectioning ________________________________ app = status = warning = @pytest.mark.sphinx('text', testroot='directive-only') def test_sectioning(app, status, warning): def getsects(section): if not isinstance(section, nodes.section): return [getsects(n) for n in section.children] title = section.next_node(nodes.title).astext().strip() subsects = [] children = section.children[:] while children: node = children.pop(0) if isinstance(node, nodes.section): subsects.append(node) continue children = list(node.children) + children return [title, [getsects(subsect) for subsect in subsects]] def testsects(prefix, sects, indent=0): title = sects[0] parent_num = title.split()[0] assert prefix == parent_num, \ 'Section out of place: %r' % title for i, subsect in enumerate(sects[1]): num = subsect[0].split()[0] assert re.match('[0-9]+[.0-9]*[.]', num), \ 'Unnumbered section: %r' % subsect[0] testsects(prefix + str(i + 1) + '.', subsect, indent + 4) > app.builder.build(['only']) tests/test_directive_only.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/directive-only # outdir: /<>/tests/build/directive-only/_build/text # status: Running Sphinx v1.8.5 updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] contents reading sources... [100%] only looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 50%] contents # warning: __________________________________ test_html ___________________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='docutilsconf') def test_html(app, status, warning): with patch_docutils(app.confdir): > app.builder.build(['contents']) tests/test_docutilsconf.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['contents']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/docutilsconf # outdir: /<>/tests/build/docutilsconf/_build/html # status: Running Sphinx v1.8.5 updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] contents looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________________________ test_latex __________________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='docutilsconf') def test_latex(app, status, warning): with patch_docutils(app.confdir): > app.builder.build(['contents']) tests/test_docutilsconf.py:66: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/docutilsconf/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/docutilsconf # outdir: /<>/tests/build/docutilsconf/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing SphinxdocutilsconfTests.tex...contents resolving references... writing... done copying TeX support files... # warning: ____________________ test_build_domain_cpp_misuse_of_roles _____________________ app = status = warning = @pytest.mark.sphinx(testroot='domain-cpp') def test_build_domain_cpp_misuse_of_roles(app, status, warning): > app.builder.build_all() tests/test_domain_cpp.py:726: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['any-role', 'index', 'roles', 'roles2', 'xref_consistency']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/domain-cpp # outdir: /<>/tests/build/domain-cpp/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 5 added, 0 changed, 0 removed reading sources... [ 20%] any-role reading sources... [ 40%] index reading sources... [ 60%] roles reading sources... [ 80%] roles2 reading sources... [100%] xref_consistency looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/domain-cpp/roles2.rst:3: WARNING: Duplicate declaration, A /<>/tests/build/domain-cpp/any-role.rst: WARNING: document isn't included in any toctree /<>/tests/build/domain-cpp/roles.rst: WARNING: document isn't included in any toctree /<>/tests/build/domain-cpp/roles2.rst: WARNING: document isn't included in any toctree /<>/tests/build/domain-cpp/xref_consistency.rst: WARNING: document isn't included in any toctree _________ test_build_domain_cpp_with_add_function_parentheses_is_True __________ app = status = warning = @pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'add_function_parentheses': True}) def test_build_domain_cpp_with_add_function_parentheses_is_True(app, status, warning): > app.builder.build_all() tests/test_domain_cpp.py:733: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['any-role', 'index', 'roles', 'roles2', 'xref_consistency']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/domain-cpp # outdir: /<>/tests/build/domain-cpp/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: _________ test_build_domain_cpp_with_add_function_parentheses_is_False _________ app = status = warning = @pytest.mark.sphinx(testroot='domain-cpp', confoverrides={ 'add_function_parentheses': False}) def test_build_domain_cpp_with_add_function_parentheses_is_False(app, status, warning): > app.builder.build_all() tests/test_domain_cpp.py:775: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['any-role', 'index', 'roles', 'roles2', 'xref_consistency']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/domain-cpp # outdir: /<>/tests/build/domain-cpp/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 5 added, 0 changed, 0 removed reading sources... [ 20%] any-role reading sources... [ 40%] index reading sources... [ 60%] roles reading sources... [ 80%] roles2 reading sources... [100%] xref_consistency looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/domain-cpp/any-role.rst: WARNING: document isn't included in any toctree /<>/tests/build/domain-cpp/roles.rst: WARNING: document isn't included in any toctree /<>/tests/build/domain-cpp/roles2.rst: WARNING: document isn't included in any toctree /<>/tests/build/domain-cpp/xref_consistency.rst: WARNING: document isn't included in any toctree ____________________________ test_xref_consistency _____________________________ app = status = warning = @pytest.mark.sphinx(testroot='domain-cpp') def test_xref_consistency(app, status, warning): > app.builder.build_all() tests/test_domain_cpp.py:816: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['any-role', 'index', 'roles', 'roles2', 'xref_consistency']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/domain-cpp # outdir: /<>/tests/build/domain-cpp/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 5 added, 0 changed, 0 removed reading sources... [ 20%] any-role reading sources... [ 40%] index reading sources... [ 60%] roles reading sources... [ 80%] roles2 reading sources... [100%] xref_consistency looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/domain-cpp/any-role.rst: WARNING: document isn't included in any toctree /<>/tests/build/domain-cpp/roles.rst: WARNING: document isn't included in any toctree /<>/tests/build/domain-cpp/roles2.rst: WARNING: document isn't included in any toctree /<>/tests/build/domain-cpp/xref_consistency.rst: WARNING: document isn't included in any toctree _______________________________ test_process_doc _______________________________ app = @pytest.mark.sphinx('xml', testroot='toctree') @pytest.mark.test_params(shared_result='test_environment_toctree_basic') def test_process_doc(app): > app.build() tests/test_environment_toctree.py:26: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'bar', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/test_environment_toctree_basic # outdir: /<>/tests/build/test_environment_toctree_basic/_build/xml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [xml]: targets for 7 source files that are out of date updating environment: 7 added, 0 changed, 0 removed reading sources... [ 14%] bar reading sources... [ 28%] baz reading sources... [ 42%] foo reading sources... [ 57%] index reading sources... [ 71%] quux reading sources... [ 85%] qux reading sources... [100%] tocdepth looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 14%] bar # warning: /<>/tests/build/test_environment_toctree_basic/qux.rst: WARNING: document isn't included in any toctree /<>/tests/build/test_environment_toctree_basic/tocdepth.rst: WARNING: document isn't included in any toctree _______________________________ test_get_toc_for _______________________________ app = @pytest.mark.sphinx('xml', testroot='toctree') @pytest.mark.test_params(shared_result='test_environment_toctree_basic') def test_get_toc_for(app): > app.build() tests/test_environment_toctree.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'bar', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/test_environment_toctree_basic # outdir: /<>/tests/build/test_environment_toctree_basic/_build/xml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [xml]: targets for 7 source files that are out of date updating environment: 7 added, 0 changed, 0 removed reading sources... [ 14%] bar reading sources... [ 28%] baz reading sources... [ 42%] foo reading sources... [ 57%] index reading sources... [ 71%] quux reading sources... [ 85%] qux reading sources... [100%] tocdepth looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 14%] bar # warning: /<>/tests/build/test_environment_toctree_basic/qux.rst: WARNING: document isn't included in any toctree /<>/tests/build/test_environment_toctree_basic/tocdepth.rst: WARNING: document isn't included in any toctree ____________________________ test_get_toc_for_only _____________________________ app = @pytest.mark.sphinx('xml', testroot='toctree') @pytest.mark.test_params(shared_result='test_environment_toctree_basic') def test_get_toc_for_only(app): > app.build() tests/test_environment_toctree.py:168: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'bar', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/test_environment_toctree_basic # outdir: /<>/tests/build/test_environment_toctree_basic/_build/xml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [xml]: targets for 7 source files that are out of date updating environment: 7 added, 0 changed, 0 removed reading sources... [ 14%] bar reading sources... [ 28%] baz reading sources... [ 42%] foo reading sources... [ 57%] index reading sources... [ 71%] quux reading sources... [ 85%] qux reading sources... [100%] tocdepth looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 14%] bar # warning: /<>/tests/build/test_environment_toctree_basic/qux.rst: WARNING: document isn't included in any toctree /<>/tests/build/test_environment_toctree_basic/tocdepth.rst: WARNING: document isn't included in any toctree __________________________ test_get_toc_for_tocdepth ___________________________ app = @pytest.mark.sphinx('xml', testroot='toctree') @pytest.mark.test_params(shared_result='test_environment_toctree_basic') def test_get_toc_for_tocdepth(app): > app.build() tests/test_environment_toctree.py:198: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'bar', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/test_environment_toctree_basic # outdir: /<>/tests/build/test_environment_toctree_basic/_build/xml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [xml]: targets for 7 source files that are out of date updating environment: 7 added, 0 changed, 0 removed reading sources... [ 14%] bar reading sources... [ 28%] baz reading sources... [ 42%] foo reading sources... [ 57%] index reading sources... [ 71%] quux reading sources... [ 85%] qux reading sources... [100%] tocdepth looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 14%] bar # warning: /<>/tests/build/test_environment_toctree_basic/qux.rst: WARNING: document isn't included in any toctree /<>/tests/build/test_environment_toctree_basic/tocdepth.rst: WARNING: document isn't included in any toctree _____________________________ test_get_toctree_for _____________________________ app = @pytest.mark.sphinx('xml', testroot='toctree') @pytest.mark.test_params(shared_result='test_environment_toctree_basic') def test_get_toctree_for(app): > app.build() tests/test_environment_toctree.py:213: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'bar', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/test_environment_toctree_basic # outdir: /<>/tests/build/test_environment_toctree_basic/_build/xml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [xml]: targets for 7 source files that are out of date updating environment: 7 added, 0 changed, 0 removed reading sources... [ 14%] bar reading sources... [ 28%] baz reading sources... [ 42%] foo reading sources... [ 57%] index reading sources... [ 71%] quux reading sources... [ 85%] qux reading sources... [100%] tocdepth looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 14%] bar # warning: /<>/tests/build/test_environment_toctree_basic/qux.rst: WARNING: document isn't included in any toctree /<>/tests/build/test_environment_toctree_basic/tocdepth.rst: WARNING: document isn't included in any toctree ________________________ test_get_toctree_for_collapse _________________________ app = @pytest.mark.sphinx('xml', testroot='toctree') @pytest.mark.test_params(shared_result='test_environment_toctree_basic') def test_get_toctree_for_collapse(app): > app.build() tests/test_environment_toctree.py:250: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'bar', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/test_environment_toctree_basic # outdir: /<>/tests/build/test_environment_toctree_basic/_build/xml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [xml]: targets for 7 source files that are out of date updating environment: 7 added, 0 changed, 0 removed reading sources... [ 14%] bar reading sources... [ 28%] baz reading sources... [ 42%] foo reading sources... [ 57%] index reading sources... [ 71%] quux reading sources... [ 85%] qux reading sources... [100%] tocdepth looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 14%] bar # warning: /<>/tests/build/test_environment_toctree_basic/qux.rst: WARNING: document isn't included in any toctree /<>/tests/build/test_environment_toctree_basic/tocdepth.rst: WARNING: document isn't included in any toctree ________________________ test_get_toctree_for_maxdepth _________________________ app = @pytest.mark.sphinx('xml', testroot='toctree') @pytest.mark.test_params(shared_result='test_environment_toctree_basic') def test_get_toctree_for_maxdepth(app): > app.build() tests/test_environment_toctree.py:278: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'bar', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/test_environment_toctree_basic # outdir: /<>/tests/build/test_environment_toctree_basic/_build/xml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [xml]: targets for 7 source files that are out of date updating environment: 7 added, 0 changed, 0 removed reading sources... [ 14%] bar reading sources... [ 28%] baz reading sources... [ 42%] foo reading sources... [ 57%] index reading sources... [ 71%] quux reading sources... [ 85%] qux reading sources... [100%] tocdepth looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 14%] bar # warning: /<>/tests/build/test_environment_toctree_basic/qux.rst: WARNING: document isn't included in any toctree /<>/tests/build/test_environment_toctree_basic/tocdepth.rst: WARNING: document isn't included in any toctree ______________________ test_get_toctree_for_includehidden ______________________ app = @pytest.mark.sphinx('xml', testroot='toctree') @pytest.mark.test_params(shared_result='test_environment_toctree_basic') def test_get_toctree_for_includehidden(app): > app.build() tests/test_environment_toctree.py:321: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'bar', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: xml # srcdir: /<>/tests/build/test_environment_toctree_basic # outdir: /<>/tests/build/test_environment_toctree_basic/_build/xml # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [xml]: targets for 7 source files that are out of date updating environment: 7 added, 0 changed, 0 removed reading sources... [ 14%] bar reading sources... [ 28%] baz reading sources... [ 42%] foo reading sources... [ 57%] index reading sources... [ 71%] quux reading sources... [ 85%] qux reading sources... [100%] tocdepth looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 14%] bar # warning: /<>/tests/build/test_environment_toctree_basic/qux.rst: WARNING: document isn't included in any toctree /<>/tests/build/test_environment_toctree_basic/tocdepth.rst: WARNING: document isn't included in any toctree __________________________ test_autosectionlabel_html __________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-autosectionlabel') def test_autosectionlabel_html(app, status, warning): > app.builder.build_all() tests/test_ext_autosectionlabel.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-autosectionlabel # outdir: /<>/tests/build/ext-autosectionlabel/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_autosectionlabel_prefix_document_html __________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-autosectionlabel-prefix-document') def test_autosectionlabel_prefix_document_html(app, status, warning): > return test_autosectionlabel_html(app, status, warning) tests/test_ext_autosectionlabel.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_ext_autosectionlabel.py:19: in test_autosectionlabel_html app.builder.build_all() sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-autosectionlabel-prefix-document # outdir: /<>/tests/build/ext-autosectionlabel-prefix-document/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________________________ test_get_items_summary ____________________________ make_app = app_params = app_params(args=['dummy'], kwargs={'confoverrides': {'source_suffix': '.rst', ... 'srcdir': path(u'/<>/tests/build/autosummary')}) @pytest.mark.sphinx('dummy', **default_kw) def test_get_items_summary(make_app, app_params): import sphinx.ext.autosummary import sphinx.ext.autosummary.generate args, kwargs = app_params > app = make_app(*args, **kwargs) tests/test_ext_autosummary.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:142: in __init__ freshenv, warningiserror, tags) sphinx/application.py:263: in __init__ self._init_builder() sphinx/application.py:325: in _init_builder self.emit('builder-inited') sphinx/application.py:510: in emit return self.events.emit(event, self, *args) sphinx/events.py:80: in emit results.append(callback(*args)) sphinx/ext/autosummary/__init__.py:696: in process_generate_options app=app) sphinx/ext/autosummary/generate.py:136: in generate_autosummary_docs items = find_autosummary_in_files(sources) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filenames = ['/<>/tests/build/autosummary/sphinx.rst', '/<>/tests/build/autosummary/contents.rst'] def find_autosummary_in_files(filenames): # type: (List[unicode]) -> List[Tuple[unicode, unicode, unicode]] """Find out what items are documented in source/*.rst. See `find_autosummary_in_lines`. """ documented = [] # type: List[Tuple[unicode, unicode, unicode]] for filename in filenames: with open(filename, 'r', encoding='utf-8', # type: ignore > errors='ignore') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/ext/autosummary/generate.py:252: TypeError __________________________________ test_build __________________________________ app = status = warning = @pytest.mark.sphinx('coverage') def test_build(app, status, warning): app.builder.build_all() > py_undoc = (app.outdir / 'python.txt').text() tests/test_ext_coverage.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/root/_build/coverage/python.txt') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: coverage # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/coverage # status: Running Sphinx v1.8.5 loading pickled environment... done building [coverage]: all source files updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) WARNING: module mod could not be imported: No module named mod _______________________________ test_githubpages _______________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-githubpages') def test_githubpages(app, status, warning): > app.builder.build_all() tests/test_ext_githubpages.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-githubpages # outdir: /<>/tests/build/ext-githubpages/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________________________ test_graphviz_png_html ____________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-graphviz') @pytest.mark.usefixtures('if_graphviz_found') def test_graphviz_png_html(app, status, warning): > app.builder.build_all() tests/test_ext_graphviz.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:360: in build updated_docnames = set(self.read()) sphinx/builders/__init__.py:468: in read self._read_serial(docnames) sphinx/builders/__init__.py:490: in _read_serial self.read_doc(docname) sphinx/builders/__init__.py:534: in read_doc doctree = read_doc(self.app, self.env, self.env.doc2path(docname)) sphinx/io.py:318: in read_doc pub.publish() /usr/lib/python2.7/dist-packages/docutils/core.py:217: in publish self.settings) /usr/lib/python2.7/dist-packages/docutils/readers/__init__.py:72: in read self.parse() /usr/lib/python2.7/dist-packages/docutils/readers/__init__.py:78: in parse self.parser.parse(self.input, document) sphinx/parsers.py:88: in parse self.statemachine.run(inputstring, document, inliner=self.inliner) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:172: in run input_source=document['source']) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2754: in underline self.section(title, source, style, lineno - 1, messages) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:328: in section self.new_subsection(title, lineno, messages) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:396: in new_subsection node=section_node, match_titles=True) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:283: in nested_parse node=node, match_titles=match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:197: in run results = StateMachineWS.run(self, input_lines, input_offset) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2329: in explicit_markup self.explicit_list(blank_finish) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2359: in explicit_list match_titles=self.state_machine.match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:320: in nested_list_parse node=node, match_titles=match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:197: in run results = StateMachineWS.run(self, input_lines, input_offset) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2632: in explicit_markup nodelist, blank_finish = self.explicit_construct(match) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2339: in explicit_construct return method(self, expmatch) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2082: in directive directive_class, match, type_name, option_presets) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2131: in run_directive result = directive_instance.run() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def run(self): # type: () -> List[nodes.Node] if self.arguments: document = self.state.document if self.content: return [document.reporter.warning( __('Graphviz directive cannot have both content and ' 'a filename argument'), line=self.lineno)] argument = search_image_for_language(self.arguments[0], self.env) rel_filename, filename = self.env.relfn2path(argument) self.env.note_dependency(rel_filename) try: > with open(filename, 'r', encoding='utf-8') as fp: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/ext/graphviz.py:144: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-graphviz # outdir: /<>/tests/build/ext-graphviz/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index # warning: ____________________________ test_graphviz_svg_html ____________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-graphviz', confoverrides={'graphviz_output_format': 'svg'}) @pytest.mark.usefixtures('if_graphviz_found') def test_graphviz_svg_html(app, status, warning): > app.builder.build_all() tests/test_ext_graphviz.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:360: in build updated_docnames = set(self.read()) sphinx/builders/__init__.py:468: in read self._read_serial(docnames) sphinx/builders/__init__.py:490: in _read_serial self.read_doc(docname) sphinx/builders/__init__.py:534: in read_doc doctree = read_doc(self.app, self.env, self.env.doc2path(docname)) sphinx/io.py:318: in read_doc pub.publish() /usr/lib/python2.7/dist-packages/docutils/core.py:217: in publish self.settings) /usr/lib/python2.7/dist-packages/docutils/readers/__init__.py:72: in read self.parse() /usr/lib/python2.7/dist-packages/docutils/readers/__init__.py:78: in parse self.parser.parse(self.input, document) sphinx/parsers.py:88: in parse self.statemachine.run(inputstring, document, inliner=self.inliner) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:172: in run input_source=document['source']) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2754: in underline self.section(title, source, style, lineno - 1, messages) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:328: in section self.new_subsection(title, lineno, messages) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:396: in new_subsection node=section_node, match_titles=True) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:283: in nested_parse node=node, match_titles=match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:197: in run results = StateMachineWS.run(self, input_lines, input_offset) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2329: in explicit_markup self.explicit_list(blank_finish) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2359: in explicit_list match_titles=self.state_machine.match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:320: in nested_list_parse node=node, match_titles=match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:197: in run results = StateMachineWS.run(self, input_lines, input_offset) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2632: in explicit_markup nodelist, blank_finish = self.explicit_construct(match) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2339: in explicit_construct return method(self, expmatch) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2082: in directive directive_class, match, type_name, option_presets) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2131: in run_directive result = directive_instance.run() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def run(self): # type: () -> List[nodes.Node] if self.arguments: document = self.state.document if self.content: return [document.reporter.warning( __('Graphviz directive cannot have both content and ' 'a filename argument'), line=self.lineno)] argument = search_image_for_language(self.arguments[0], self.env) rel_filename, filename = self.env.relfn2path(argument) self.env.note_dependency(rel_filename) try: > with open(filename, 'r', encoding='utf-8') as fp: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/ext/graphviz.py:144: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-graphviz # outdir: /<>/tests/build/ext-graphviz/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index # warning: _____________________________ test_graphviz_latex ______________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='ext-graphviz') @pytest.mark.usefixtures('if_graphviz_found') def test_graphviz_latex(app, status, warning): > app.builder.build_all() tests/test_ext_graphviz.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:360: in build updated_docnames = set(self.read()) sphinx/builders/__init__.py:468: in read self._read_serial(docnames) sphinx/builders/__init__.py:490: in _read_serial self.read_doc(docname) sphinx/builders/__init__.py:534: in read_doc doctree = read_doc(self.app, self.env, self.env.doc2path(docname)) sphinx/io.py:318: in read_doc pub.publish() /usr/lib/python2.7/dist-packages/docutils/core.py:217: in publish self.settings) /usr/lib/python2.7/dist-packages/docutils/readers/__init__.py:72: in read self.parse() /usr/lib/python2.7/dist-packages/docutils/readers/__init__.py:78: in parse self.parser.parse(self.input, document) sphinx/parsers.py:88: in parse self.statemachine.run(inputstring, document, inliner=self.inliner) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:172: in run input_source=document['source']) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2754: in underline self.section(title, source, style, lineno - 1, messages) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:328: in section self.new_subsection(title, lineno, messages) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:396: in new_subsection node=section_node, match_titles=True) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:283: in nested_parse node=node, match_titles=match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:197: in run results = StateMachineWS.run(self, input_lines, input_offset) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2329: in explicit_markup self.explicit_list(blank_finish) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2359: in explicit_list match_titles=self.state_machine.match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:320: in nested_list_parse node=node, match_titles=match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:197: in run results = StateMachineWS.run(self, input_lines, input_offset) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2632: in explicit_markup nodelist, blank_finish = self.explicit_construct(match) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2339: in explicit_construct return method(self, expmatch) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2082: in directive directive_class, match, type_name, option_presets) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2131: in run_directive result = directive_instance.run() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def run(self): # type: () -> List[nodes.Node] if self.arguments: document = self.state.document if self.content: return [document.reporter.warning( __('Graphviz directive cannot have both content and ' 'a filename argument'), line=self.lineno)] argument = search_image_for_language(self.arguments[0], self.env) rel_filename, filename = self.env.relfn2path(argument) self.env.note_dependency(rel_filename) try: > with open(filename, 'r', encoding='utf-8') as fp: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/ext/graphviz.py:144: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/ext-graphviz # outdir: /<>/tests/build/ext-graphviz/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index # warning: ______________________________ test_graphviz_i18n ______________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-graphviz', confoverrides={'language': 'xx'}) @pytest.mark.usefixtures('if_graphviz_found') def test_graphviz_i18n(app, status, warning): > app.builder.build_all() tests/test_ext_graphviz.py:117: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:360: in build updated_docnames = set(self.read()) sphinx/builders/__init__.py:468: in read self._read_serial(docnames) sphinx/builders/__init__.py:490: in _read_serial self.read_doc(docname) sphinx/builders/__init__.py:534: in read_doc doctree = read_doc(self.app, self.env, self.env.doc2path(docname)) sphinx/io.py:318: in read_doc pub.publish() /usr/lib/python2.7/dist-packages/docutils/core.py:217: in publish self.settings) /usr/lib/python2.7/dist-packages/docutils/readers/__init__.py:72: in read self.parse() /usr/lib/python2.7/dist-packages/docutils/readers/__init__.py:78: in parse self.parser.parse(self.input, document) sphinx/parsers.py:88: in parse self.statemachine.run(inputstring, document, inliner=self.inliner) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:172: in run input_source=document['source']) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2754: in underline self.section(title, source, style, lineno - 1, messages) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:328: in section self.new_subsection(title, lineno, messages) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:396: in new_subsection node=section_node, match_titles=True) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:283: in nested_parse node=node, match_titles=match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:197: in run results = StateMachineWS.run(self, input_lines, input_offset) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2329: in explicit_markup self.explicit_list(blank_finish) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2359: in explicit_list match_titles=self.state_machine.match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:320: in nested_list_parse node=node, match_titles=match_titles) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:197: in run results = StateMachineWS.run(self, input_lines, input_offset) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:239: in run context, state, transitions) /usr/lib/python2.7/dist-packages/docutils/statemachine.py:460: in check_line return method(match, context, next_state) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2632: in explicit_markup nodelist, blank_finish = self.explicit_construct(match) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2339: in explicit_construct return method(self, expmatch) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2082: in directive directive_class, match, type_name, option_presets) /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2131: in run_directive result = directive_instance.run() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def run(self): # type: () -> List[nodes.Node] if self.arguments: document = self.state.document if self.content: return [document.reporter.warning( __('Graphviz directive cannot have both content and ' 'a filename argument'), line=self.lineno)] argument = search_image_for_language(self.arguments[0], self.env) rel_filename, filename = self.env.relfn2path(argument) self.env.note_dependency(rel_filename) try: > with open(filename, 'r', encoding='utf-8') as fp: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/ext/graphviz.py:144: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-graphviz # outdir: /<>/tests/build/ext-graphviz/_build/html # status: Running Sphinx v1.8.5 loading translations [xx]... not available for built-in messages building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index # warning: ________________________________ test_ifconfig _________________________________ app = status = warning = @pytest.mark.sphinx('text', testroot='ext-ifconfig') def test_ifconfig(app, status, warning): > app.builder.build_all() tests/test_ext_ifconfig.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'index', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/ext-ifconfig # outdir: /<>/tests/build/ext-ifconfig/_build/text # status: Running Sphinx v1.8.5 building [text]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] index # warning: ____________________________ test_ext_imgconverter _____________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='ext-imgconverter') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_ext_imgconverter(app, status, warning): > app.builder.build_all() tests/test_ext_imgconverter.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/ext-imgconverter/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/ext-imgconverter # outdir: /<>/tests/build/ext-imgconverter/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing Python.tex...index resolving references... writing... done copying images... [100%] svgimg.svg copying TeX support files... # warning: ___________________________ test_inheritance_diagram ___________________________ app = status = warning = @pytest.mark.sphinx(buildername="html", testroot="inheritance") @pytest.mark.usefixtures('if_graphviz_found') def test_inheritance_diagram(app, status, warning): # monkey-patch InheritaceDiagram.run() so we can get access to its # results. orig_run = InheritanceDiagram.run graphs = {} def new_run(self): result = orig_run(self) node = result[0] source = os.path.basename(node.document.current_source).replace(".rst", "") graphs[source] = node['graph'] return result InheritanceDiagram.run = new_run try: > app.builder.build_all() tests/test_ext_inheritance.py:37: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['basic_diagram', 'contents', 'diagram_module_w_2_top_classes', 'diagram_w_1_top_class', 'diagram_w_2_top_classes', 'diagram_w_parts']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/inheritance # outdir: /<>/tests/build/inheritance/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 6 added, 0 changed, 0 removed reading sources... [ 16%] basic_diagram reading sources... [ 33%] contents reading sources... [ 50%] diagram_module_w_2_top_classes reading sources... [ 66%] diagram_w_1_top_class reading sources... [ 83%] diagram_w_2_top_classes reading sources... [100%] diagram_w_parts looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________ test_inheritance_diagram_png_html _______________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-inheritance_diagram') @pytest.mark.usefixtures('if_graphviz_found') def test_inheritance_diagram_png_html(app, status, warning): > app.builder.build_all() tests/test_ext_inheritance_diagram.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-inheritance_diagram # outdir: /<>/tests/build/ext-inheritance_diagram/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________ test_inheritance_diagram_svg_html _______________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-inheritance_diagram', confoverrides={'graphviz_output_format': 'svg'}) @pytest.mark.usefixtures('if_graphviz_found') def test_inheritance_diagram_svg_html(app, status, warning): > app.builder.build_all() tests/test_ext_inheritance_diagram.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-inheritance_diagram # outdir: /<>/tests/build/ext-inheritance_diagram/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: ________________________ test_inheritance_diagram_latex ________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='ext-inheritance_diagram') @pytest.mark.usefixtures('if_graphviz_found') def test_inheritance_diagram_latex(app, status, warning): > app.builder.build_all() tests/test_ext_inheritance_diagram.py:58: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/ext-inheritance_diagram/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/ext-inheritance_diagram # outdir: /<>/tests/build/ext-inheritance_diagram/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing Python.tex...index resolving references... writing... done copying TeX support files... # warning: _____________________ test_inheritance_diagram_latex_alias _____________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-inheritance_diagram', srcdir='ext-inheritance_diagram-alias') @pytest.mark.usefixtures('if_graphviz_found') def test_inheritance_diagram_latex_alias(app, status, warning): app.config.inheritance_alias = {'test.Foo': 'alias.Foo'} > app.builder.build_all() tests/test_ext_inheritance_diagram.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-inheritance_diagram-alias # outdir: /<>/tests/build/ext-inheritance_diagram-alias/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________ test_missing_reference_cppdomain _______________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_missing_reference_cppdoma0') app = status = warning = @pytest.mark.sphinx('html', testroot='ext-intersphinx-cppdomain') def test_missing_reference_cppdomain(tempdir, app, status, warning): inv_file = tempdir / 'inventory' inv_file.write_bytes(inventory_v2) app.config.intersphinx_mapping = { 'https://docs.python.org/': inv_file, } app.config.intersphinx_cache_limit = 0 # load the inventory and check if it's done correctly load_mappings(app) > app.build() tests/test_ext_intersphinx.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-intersphinx-cppdomain # outdir: /<>/tests/build/ext-intersphinx-cppdomain/_build/html # status: Running Sphinx v1.8.5 loading intersphinx inventory from /tmp/pytest-of-buildd/pytest-0/test_missing_reference_cppdoma0/inventory... building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________________________ test_jsmath __________________________________ app = status = warning = @pytest.mark.sphinx( 'html', testroot='ext-math', confoverrides = {'extensions': ['sphinx.ext.jsmath'], 'jsmath_path': 'dummy.js'}) def test_jsmath(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'math', 'page']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-math # outdir: /<>/tests/build/ext-math/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] math reading sources... [100%] page looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________________ test_imgmath_png _______________________________ app = status = warning = @pytest.mark.skipif(not has_binary('dvipng'), reason='Requires dvipng" binary') @pytest.mark.sphinx('html', testroot='ext-math-simple', confoverrides = {'extensions': ['sphinx.ext.imgmath']}) def test_imgmath_png(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-math-simple # outdir: /<>/tests/build/ext-math-simple/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________________ test_imgmath_svg _______________________________ app = status = warning = @pytest.mark.skipif(not has_binary('dvisvgm'), reason='Requires dvisvgm" binary') @pytest.mark.sphinx('html', testroot='ext-math-simple', confoverrides={'extensions': ['sphinx.ext.imgmath'], 'imgmath_image_format': 'svg'}) def test_imgmath_svg(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:81: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-math-simple # outdir: /<>/tests/build/ext-math-simple/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: _____________________________ test_mathjax_options _____________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-math', confoverrides={'extensions': ['sphinx.ext.mathjax'], 'mathjax_options': {'integrity': 'sha384-0123456789'}}) def test_mathjax_options(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:97: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'math', 'page']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-math # outdir: /<>/tests/build/ext-math/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] math reading sources... [100%] page looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________________ test_mathjax_align ______________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-math', confoverrides={'extensions': ['sphinx.ext.mathjax']}) def test_mathjax_align(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'math', 'page']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-math # outdir: /<>/tests/build/ext-math/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: _________________________ test_math_number_all_mathjax _________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-math', confoverrides={'math_number_all': True, 'extensions': ['sphinx.ext.mathjax']}) def test_math_number_all_mathjax(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'math', 'page']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-math # outdir: /<>/tests/build/ext-math/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] math reading sources... [100%] page looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________________ test_math_number_all_latex __________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='ext-math', confoverrides={'extensions': ['sphinx.ext.mathjax']}) def test_math_number_all_latex(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/ext-math/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/ext-math # outdir: /<>/tests/build/ext-math/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] math reading sources... [100%] page looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index math page resolving references... writing... done copying TeX support files... # warning: _________________________ test_math_eqref_format_html __________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-math', confoverrides={'extensions': ['sphinx.ext.mathjax'], 'math_eqref_format': 'Eq.{number}'}) def test_math_eqref_format_html(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'math', 'page']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-math # outdir: /<>/tests/build/ext-math/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] math reading sources... [100%] page looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________________ test_math_eqref_format_latex _________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='ext-math', confoverrides={'extensions': ['sphinx.ext.mathjax'], 'math_eqref_format': 'Eq.{number}'}) def test_math_eqref_format_latex(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/latex/__init__.py:220: in write docwriter.write(doctree, destination) /usr/lib/python2.7/dist-packages/docutils/writers/__init__.py:81: in write output = self.destination.write(self.output) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=None, destination_path=u'/<>/tests/build/ext-math/_build/latex/test.tex' data = '%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{report} \ifdefined\pdfpx...2\\ V &= \frac{4}{3} \pi r^3\\ \end{aligned}\end{align*} \renewcommand{\indexname}{Index} \printindex \end{document}' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/ext-math # outdir: /<>/tests/build/ext-math/_build/latex # status: Running Sphinx v1.8.5 loading pickled environment... done building [latex]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found processing test.tex...index math page resolving references... writing... # warning: ___________________________ test_mathjax_numfig_html ___________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-math', confoverrides={'extensions': ['sphinx.ext.mathjax'], 'numfig': True, 'math_numfig': True}) def test_mathjax_numfig_html(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:188: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'math', 'page']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-math # outdir: /<>/tests/build/ext-math/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] math reading sources... [100%] page looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________________ test_jsmath_numfig_html ____________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-math', confoverrides={'extensions': ['sphinx.ext.jsmath'], 'jsmath_path': 'dummy.js', 'numfig': True, 'math_numfig': True}) def test_jsmath_numfig_html(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:206: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'math', 'page']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-math # outdir: /<>/tests/build/ext-math/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] math reading sources... [100%] page looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________________ test_imgmath_numfig_html ___________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-math', confoverrides={'extensions': ['sphinx.ext.imgmath'], 'numfig': True, 'numfig_secnum_depth': 0, 'math_numfig': True}) def test_imgmath_numfig_html(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'math', 'page']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-math # outdir: /<>/tests/build/ext-math/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] math reading sources... [100%] page looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________________________ test_mathjax_config ______________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-math', confoverrides={'extensions': ['sphinx.ext.mathjax'], 'mathjax_config': {'extensions': ['tex2jax.js']}}) def test_mathjax_config(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:263: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'math', 'page']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-math # outdir: /<>/tests/build/ext-math/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] index reading sources... [ 66%] math reading sources... [100%] page looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ________________ test_mathjax_is_not_installed_if_no_equations _________________ app = status = warning = @pytest.mark.sphinx('html', testroot='basic', confoverrides={'extensions': ['sphinx.ext.mathjax']}) def test_mathjax_is_not_installed_if_no_equations(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:274: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _________________ test_jsmath_is_not_installed_if_no_equations _________________ app = status = warning = @pytest.mark.sphinx('html', testroot='basic', confoverrides={'extensions': ['sphinx.ext.jsmath'], 'jsmath_path': 'jsmath.js'}) def test_jsmath_is_not_installed_if_no_equations(app, status, warning): > app.builder.build_all() tests/test_ext_math.py:284: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/basic # outdir: /<>/tests/build/basic/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________________________ test_todo ___________________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-todo', freshenv=True, confoverrides={'todo_include_todos': True, 'todo_emit_warnings': True}) def test_todo(app, status, warning): todos = [] def on_todo_defined(app, node): todos.append(node) app.connect('todo-defined', on_todo_defined) > app.builder.build_all() tests/test_ext_todo.py:26: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-todo # outdir: /<>/tests/build/ext-todo/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/ext-todo/bar.rst:4: WARNING: TODO entry found: todo in bar /<>/tests/build/ext-todo/foo.rst:4: WARNING: TODO entry found: todo in foo /<>/tests/build/ext-todo/foo.rst:10: WARNING: TODO entry found: todo in param field ____________________________ test_todo_not_included ____________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='ext-todo', freshenv=True, confoverrides={'todo_include_todos': False, 'todo_emit_warnings': True}) def test_todo_not_included(app, status, warning): todos = [] def on_todo_defined(app, node): todos.append(node) app.connect('todo-defined', on_todo_defined) > app.builder.build_all() tests/test_ext_todo.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar', 'foo', 'index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-todo # outdir: /<>/tests/build/ext-todo/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/ext-todo/bar.rst:4: WARNING: TODO entry found: todo in bar /<>/tests/build/ext-todo/foo.rst:4: WARNING: TODO entry found: todo in foo /<>/tests/build/ext-todo/foo.rst:10: WARNING: TODO entry found: todo in param field _____________________________ test_todo_valid_link _____________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='ext-todo', freshenv=True, confoverrides={'todo_include_todos': True}) def test_todo_valid_link(app, status, warning): """ Test that the inserted "original entry" links for todo items have a target that exists in the LaTeX output. The target was previously incorrectly omitted (GitHub issue #1020). """ # Ensure the LaTeX output is built. > app.builder.build_all() tests/test_ext_todo.py:107: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/ext-todo/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/ext-todo # outdir: /<>/tests/build/ext-todo/_build/latex # status: Running Sphinx v1.8.5 building [latex]: all source files updating environment: 3 added, 0 changed, 0 removed reading sources... [ 33%] bar reading sources... [ 66%] foo reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing TodoTests.tex...index foo bar resolving references... writing... done copying TeX support files... # warning: ________________________________ test_viewcode _________________________________ app = status = warning = @pytest.mark.sphinx(testroot='ext-viewcode') def test_viewcode(app, status, warning): > app.builder.build_all() tests/test_ext_viewcode.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'objects']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-viewcode # outdir: /<>/tests/build/ext-viewcode/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] index reading sources... [100%] objects looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: error while formatting arguments for spam.Class1: is a builtin class WARNING: error while formatting arguments for spam.Class2: is a builtin class WARNING: error while formatting arguments for spam.mod1.Class1: is a builtin class WARNING: error while formatting arguments for spam.mod2.Class2: is a builtin class /<>/tests/build/ext-viewcode/index.rst:23: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/ext-viewcode/index.rst:27: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/ext-viewcode/objects.rst:155: WARNING: Unknown directive type "userdesc". .. userdesc:: myobj:parameter Description of userdesc. /<>/tests/build/ext-viewcode/objects.rst:160: WARNING: Unknown interpreted text role "userdescrole". /<>/tests/build/ext-viewcode/objects.rst:166: WARNING: Too many template argument lists compared to parameter lists. Argument lists: 1, Parameter lists: 0, Extra empty parameters lists prepended: 1. Declaration: n::Array ________________________________ test_linkcode _________________________________ app = status = warning = @pytest.mark.sphinx(testroot='ext-viewcode', tags=['test_linkcode']) def test_linkcode(app, status, warning): > app.builder.build(['objects']) tests/test_ext_viewcode.py:55: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'objects']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-viewcode # outdir: /<>/tests/build/ext-viewcode/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... failed: build environment version not current updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] index reading sources... [100%] objects looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: error while formatting arguments for spam.Class1: is a builtin class WARNING: error while formatting arguments for spam.Class2: is a builtin class WARNING: error while formatting arguments for spam.mod1.Class1: is a builtin class WARNING: error while formatting arguments for spam.mod2.Class2: is a builtin class /<>/tests/build/ext-viewcode/index.rst:23: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/ext-viewcode/index.rst:27: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/ext-viewcode/objects.rst:155: WARNING: Unknown directive type "userdesc". .. userdesc:: myobj:parameter Description of userdesc. /<>/tests/build/ext-viewcode/objects.rst:160: WARNING: Unknown interpreted text role "userdescrole". /<>/tests/build/ext-viewcode/objects.rst:166: WARNING: Too many template argument lists compared to parameter lists. Argument lists: 1, Parameter lists: 0, Extra empty parameters lists prepended: 1. Declaration: n::Array ___________________________ test_local_source_files ____________________________ app = status = warning = @pytest.mark.sphinx(testroot='ext-viewcode-find') def test_local_source_files(app, status, warning): def find_source(app, modname): if modname == 'not_a_package': source = (app.srcdir / 'not_a_package/__init__.py').text() tags = { 'func1': ('def', 3, 3), 'Class1': ('class', 3, 3), 'not_a_package.submodule.func1': ('def', 3, 3), 'not_a_package.submodule.Class1': ('class', 3, 3), } else: source = (app.srcdir / 'not_a_package/submodule.py').text() tags = { 'not_a_package.submodule.func1': ('def', 11, 15), 'Class1': ('class', 19, 22), 'not_a_package.submodule.Class1': ('class', 19, 22), 'Class3': ('class', 25, 30), 'not_a_package.submodule.Class3.class_attr': ('other', 29, 29), } return (source, tags) app.connect('viewcode-find-source', find_source) > app.builder.build_all() tests/test_ext_viewcode.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:360: in build updated_docnames = set(self.read()) sphinx/builders/__init__.py:468: in read self._read_serial(docnames) sphinx/builders/__init__.py:490: in _read_serial self.read_doc(docname) sphinx/builders/__init__.py:534: in read_doc doctree = read_doc(self.app, self.env, self.env.doc2path(docname)) sphinx/io.py:318: in read_doc pub.publish() /usr/lib/python2.7/dist-packages/docutils/core.py:218: in publish self.apply_transforms() /usr/lib/python2.7/dist-packages/docutils/core.py:199: in apply_transforms self.document.transformer.apply_transforms() sphinx/transforms/__init__.py:90: in apply_transforms Transformer.apply_transforms(self) /usr/lib/python2.7/dist-packages/docutils/transforms/__init__.py:171: in apply_transforms transform.apply(**kwargs) sphinx/transforms/__init__.py:408: in apply self.app.emit('doctree-read', self.document) sphinx/application.py:510: in emit return self.events.emit(event, self, *args) sphinx/events.py:80: in emit results.append(callback(*args)) sphinx/ext/viewcode.py:116: in doctree_read if not has_tag(modname, fullname, env.docname, refname): sphinx/ext/viewcode.py:70: in has_tag code_tags = app.emit_firstresult('viewcode-find-source', modname) sphinx/application.py:520: in emit_firstresult return self.events.emit_firstresult(event, self, *args) sphinx/events.py:85: in emit_firstresult for result in self.emit(name, *args): sphinx/events.py:80: in emit results.append(callback(*args)) tests/test_ext_viewcode.py:69: in find_source source = (app.srcdir / 'not_a_package/__init__.py').text() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/ext-viewcode-find/not_a_package/__init__.py') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-viewcode-find # outdir: /<>/tests/build/ext-viewcode-find/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index # warning: /<>/tests/build/ext-viewcode-find/index.rst:28: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/ext-viewcode-find/index.rst:32: WARNING: file() takes at most 3 arguments (4 given) ______________________________ test_text_toctree _______________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_toctree(app): > app.build() tests/test_intl.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... not available for built-in messages building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/admonitions.txt:: WARNING: language "xx" not supported: Docutils-generated text will be in English. /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ___________________________ test_text_emit_warnings ____________________________ app = warning = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_emit_warnings(app, warning): > app.build() tests/test_intl.py:133: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ____________________________ test_text_warning_node ____________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_warning_node(app): > app.build() tests/test_intl.py:145: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. __________________________ test_text_title_underline ___________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_text_title_underline(app): > app.build() tests/test_intl.py:159: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ______________________________ test_text_subdirs _______________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_subdirs(app): > app.build() tests/test_intl.py:172: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _______________________ test_text_inconsistency_warnings _______________________ app = warning = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_inconsistency_warnings(app, warning): > app.build() tests/test_intl.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _______________________ test_text_literalblock_warnings ________________________ app = warning = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_literalblock_warnings(app, warning): > app.build() tests/test_intl.py:232: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. __________________________ test_text_definition_terms __________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_definition_terms(app): > app.build() tests/test_intl.py:254: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ___________________________ test_text_glossary_term ____________________________ app = warning = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_glossary_term(app, warning): > app.build() tests/test_intl.py:275: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ___________________ test_text_glossary_term_inconsistencies ____________________ app = warning = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_glossary_term_inconsistencies(app, warning): > app.build() tests/test_intl.py:294: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ______________________________ test_text_section _______________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_section(app): > app.build() tests/test_intl.py:327: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ______________________________ test_text_seealso _______________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_seealso(app): > app.build() tests/test_intl.py:339: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. __________________________ test_text_figure_captions ___________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_figure_captions(app): > app.build() tests/test_intl.py:355: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _______________________________ test_text_rubric _______________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_rubric(app): > app.build() tests/test_intl.py:398: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _____________________________ test_text_docfields ______________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_docfields(app): > app.build() tests/test_intl.py:416: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ____________________________ test_text_admonitions _____________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_admonitions(app): > app.build() tests/test_intl.py:445: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _______________________________ test_text_table ________________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_table(app): > app.build() tests/test_intl.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _______________________________ test_text_topic ________________________________ app = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_topic(app): > app.build() tests/test_intl.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [text]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. __________________________ test_gettext_literalblock ___________________________ app = @sphinx_intl @pytest.mark.sphinx('gettext') @pytest.mark.test_params(shared_result='test_intl_gettext') def test_gettext_literalblock(app): app.build() # --- gettext builder always ignores ``only`` directive expect = read_po(app.srcdir / 'literalblock.po') actual = read_po(app.outdir / 'literalblock.pot') for expect_msg in [m for m in expect if m.id]: if len(expect_msg.id.splitlines()) == 1: # compare tranlsations only labels > assert expect_msg.id in [m.id for m in actual if m.id] E assert 'included raw.txt' in ['i18n with literal block', 'Correct literal block::', 'Missing literal block::', "That's all.", 'code blocks', 'example of C language', ...] E + where 'included raw.txt' = .id tests/test_intl.py:570: AssertionError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: gettext # srcdir: /<>/tests/build/test_intl_gettext # outdir: /<>/tests/build/test_intl_gettext/_build/gettext # status: Running Sphinx v1.8.5 loading translations [xx]... done loading pickled environment... done t]: targets for 1 template files reading templates... [100%] /<>/tests/build/test_intl_gettext/_templates/index.html building [gettext]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions writing output... [ 7%] bom writing output... [ 11%] contents writing output... [ 14%] definition_terms writing output... [ 18%] docfields writing output... [ 22%] external_links writing output... [ 25%] figure writing output... [ 29%] footnote writing output... [ 33%] glossary_terms writing output... [ 37%] glossary_terms_inconsistency writing output... [ 40%] index_entries writing output... [ 44%] label_target writing output... [ 48%] literalblock writing output... [ 51%] only writing output... [ 55%] raw writing output... [ 59%] refs writing output... [ 62%] refs_inconsistency writing output... [ 66%] refs_python_domain writing output... [ 70%] role_xref writing output... [ 74%] rubric writing output... [ 77%] section writing output... [ 81%] seealso writing output... [ 85%] subdir/contents writing output... [ 88%] table writing output... [ 92%] topic writing output... [ 96%] versionchange writing output... [100%] warnings writing message catalogs... [ 3%] refs_python_domain writing message catalogs... [ 7%] figure writing message catalogs... [ 10%] subdir/contents writing message catalogs... [ 14%] footnote writing message catalogs... [ 17%] refs_inconsistency writing message catalogs... [ 21%] topic writing message catalogs... [ 25%] raw writing message catalogs... [ 28%] rubric writing message catalogs... [ 32%] versionchange writing message catalogs... [ 35%] table writing message catalogs... [ 39%] contents writing message catalogs... [ 42%] docfields writing message catalogs... [ 46%] role_xref writing message catalogs... [ 50%] section writing message catalogs... [ 53%] only writing message catalogs... [ 57%] refs writing message catalogs... [ 60%] warnings writing message catalogs... [ 64%] index_entries writing message catalogs... [ 67%] label_target writing message catalogs... [ 71%] definition_terms writing message catalogs... [ 75%] external_links writing message catalogs... [ 78%] seealso writing message catalogs... [ 82%] glossary_terms writing message catalogs... [ 85%] sphinx writing message catalogs... [ 89%] glossary_terms_inconsistency writing message catalogs... [ 92%] admonitions writing message catalogs... [ 96%] literalblock writing message catalogs... [100%] bom build succeeded, 21 warnings. The message catalogs are in ../../../tests/build/test_intl_gettext/_build/gettext. # warning: /<>/tests/build/test_intl_gettext/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_gettext/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_gettext/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_gettext/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_gettext/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_gettext/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_gettext/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_gettext/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_gettext/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_gettext/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_gettext/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_gettext/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_gettext/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_gettext/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_gettext/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_gettext/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_gettext/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_gettext/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_gettext/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_gettext/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. /<>/tests/build/test_intl_gettext/refs_inconsistency.txt:6: WARNING: citation not found: ref3 ________________________________ test_html_meta ________________________________ app = @sphinx_intl @pytest.mark.sphinx('html') @pytest.mark.test_params(shared_result='test_intl_basic') def test_html_meta(app): > app.build() tests/test_intl.py:632: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['admonitions', 'bom', 'contents', 'definition_terms', 'docfields', 'external_links', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: html # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/html # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... paring documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _____________________________ test_html_footnotes ______________________________ app = @sphinx_intl @pytest.mark.sphinx('html') @pytest.mark.test_params(shared_result='test_intl_basic') def test_html_footnotes(app): > app.build() tests/test_intl.py:645: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['admonitions', 'bom', 'contents', 'definition_terms', 'docfields', 'external_links', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: html # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/html # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... paring documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ___________________________ test_html_undefined_refs ___________________________ app = @sphinx_intl @pytest.mark.sphinx('html') @pytest.mark.test_params(shared_result='test_intl_basic') def test_html_undefined_refs(app): > app.build() tests/test_intl.py:655: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['admonitions', 'bom', 'contents', 'definition_terms', 'docfields', 'external_links', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: html # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/html # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... paring documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ___________________________ test_html_index_entries ____________________________ app = @sphinx_intl @pytest.mark.sphinx('html') @pytest.mark.test_params(shared_result='test_intl_basic') def test_html_index_entries(app): > app.build() tests/test_intl.py:677: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['admonitions', 'bom', 'contents', 'definition_terms', 'docfields', 'external_links', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: html # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/html # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... paring documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ___________________________ test_html_versionchanges ___________________________ app = @sphinx_intl @pytest.mark.sphinx('html') @pytest.mark.test_params(shared_result='test_intl_basic') def test_html_versionchanges(app): > app.build() tests/test_intl.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['admonitions', 'bom', 'contents', 'definition_terms', 'docfields', 'external_links', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: html # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/html # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... paring documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _____________________________ test_html_docfields ______________________________ app = @sphinx_intl @pytest.mark.sphinx('html') @pytest.mark.test_params(shared_result='test_intl_basic') def test_html_docfields(app): > app.build() tests/test_intl.py:751: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['admonitions', 'bom', 'contents', 'definition_terms', 'docfields', 'external_links', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: html # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/html # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... paring documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ______________________________ test_html_template ______________________________ app = @sphinx_intl @pytest.mark.sphinx('html') @pytest.mark.test_params(shared_result='test_intl_basic') def test_html_template(app): > app.build() tests/test_intl.py:761: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['admonitions', 'bom', 'contents', 'definition_terms', 'docfields', 'external_links', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: html # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/html # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... paring documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _____________________________ test_html_rebuild_mo _____________________________ app = @sphinx_intl @pytest.mark.sphinx('html') @pytest.mark.test_params(shared_result='test_intl_basic') def test_html_rebuild_mo(app): > app.build() tests/test_intl.py:772: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['admonitions', 'bom', 'contents', 'definition_terms', 'docfields', 'external_links', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: html # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/html # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... paring documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ______________________________ test_xml_footnotes ______________________________ app = warning = @sphinx_intl @pytest.mark.sphinx('xml') @pytest.mark.test_params(shared_result='test_intl_basic') def test_xml_footnotes(app, warning): > app.build() tests/test_intl.py:790: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: xml # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/xml # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [xml]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _________________________ test_xml_footnote_backlinks __________________________ app = @sphinx_intl @pytest.mark.sphinx('xml') @pytest.mark.test_params(shared_result='test_intl_basic') def test_xml_footnote_backlinks(app): > app.build() tests/test_intl.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: xml # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/xml # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [xml]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ________________________ test_xml_refs_in_python_domain ________________________ app = @sphinx_intl @pytest.mark.sphinx('xml') @pytest.mark.test_params(shared_result='test_intl_basic') def test_xml_refs_in_python_domain(app): > app.build() tests/test_intl.py:865: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: xml # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/xml # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [xml]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _________________________ test_xml_keep_external_links _________________________ app = @sphinx_intl @pytest.mark.sphinx('xml') @pytest.mark.test_params(shared_result='test_intl_basic') def test_xml_keep_external_links(app): > app.build() tests/test_intl.py:882: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: xml # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/xml # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [xml]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ______________________________ test_xml_role_xref ______________________________ app = @sphinx_intl @pytest.mark.sphinx('xml') @pytest.mark.test_params(shared_result='test_intl_basic') def test_xml_role_xref(app): > app.build() tests/test_intl.py:940: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: xml # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/xml # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [xml]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ______________________________ test_xml_warnings _______________________________ app = warning = @sphinx_intl @pytest.mark.sphinx('xml') @pytest.mark.test_params(shared_result='test_intl_basic') def test_xml_warnings(app, warning): > app.build() tests/test_intl.py:990: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: xml # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/xml # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [xml]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ____________________________ test_xml_label_targets ____________________________ app = @sphinx_intl @pytest.mark.sphinx('xml') @pytest.mark.test_params(shared_result='test_intl_basic') def test_xml_label_targets(app): > app.build() tests/test_intl.py:1002: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'admonitions', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: xml # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/xml # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [xml]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _______________ test_additional_targets_should_not_be_translated _______________ app = @sphinx_intl @pytest.mark.sphinx('html') @pytest.mark.test_params(shared_result='test_intl_basic') def test_additional_targets_should_not_be_translated(app): > app.build() tests/test_intl.py:1059: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/util.py:187: in build self.app.build(*args, **kw) sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['admonitions', 'bom', 'contents', 'definition_terms', 'docfields', 'external_links', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: html # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/html # status: Running Sphinx v1.8.5 loading translations [xx]... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... paring documents... done writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _________________ test_additional_targets_should_be_translated _________________ app = @sphinx_intl @pytest.mark.sphinx( 'html', srcdir='test_additional_targets_should_be_translated', confoverrides={ 'language': 'xx', 'locale_dirs': ['.'], 'gettext_compact': False, 'gettext_additional_targets': [ 'index', 'literal-block', 'doctest-block', 'raw', 'image', ], } ) def test_additional_targets_should_be_translated(app): > app.build() tests/test_intl.py:1133: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['admonitions', 'bom', 'contents', 'definition_terms', 'docfields', 'external_links', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: html # srcdir: /<>/tests/build/test_additional_targets_should_be_translated # outdir: /<>/tests/build/test_additional_targets_should_be_translated/_build/html # status: Running Sphinx v1.8.5 loading translations [xx]... not available for built-in messages building [mo]: targets for 0 po files that are out of date building [html]: targets for 27 source files that are out of date updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: /<>/tests/build/test_additional_targets_should_be_translated/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_additional_targets_should_be_translated/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_additional_targets_should_be_translated/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_additional_targets_should_be_translated/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_additional_targets_should_be_translated/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_additional_targets_should_be_translated/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_additional_targets_should_be_translated/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_additional_targets_should_be_translated/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_additional_targets_should_be_translated/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_additional_targets_should_be_translated/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_additional_targets_should_be_translated/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_additional_targets_should_be_translated/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_additional_targets_should_be_translated/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_additional_targets_should_be_translated/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_additional_targets_should_be_translated/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_additional_targets_should_be_translated/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_additional_targets_should_be_translated/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_additional_targets_should_be_translated/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_additional_targets_should_be_translated/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_additional_targets_should_be_translated/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _____________________________ test_text_references _____________________________ app = warning = @sphinx_intl @pytest.mark.sphinx('text') @pytest.mark.test_params(shared_result='test_intl_basic') def test_text_references(app, warning): > app.builder.build_specific([app.srcdir / 'refs.txt']) tests/test_intl.py:1194: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:335: in build_specific summary=__('%d source files given on command line') % len(to_write)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'contents', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # language: xx # locale_dirs: ['.'] # testroot: root # builder: text # srcdir: /<>/tests/build/test_intl_basic # outdir: /<>/tests/build/test_intl_basic/_build/text # status: Running Sphinx v1.8.5 loading translations [xx]... done building [text]: 1 source files given on command line updating environment: 27 added, 0 changed, 0 removed reading sources... [ 3%] admonitions reading sources... [ 7%] bom reading sources... [ 11%] contents reading sources... [ 14%] definition_terms reading sources... [ 18%] docfields reading sources... [ 22%] external_links reading sources... [ 25%] figure reading sources... [ 29%] footnote reading sources... [ 33%] glossary_terms reading sources... [ 37%] glossary_terms_inconsistency reading sources... [ 40%] index_entries reading sources... [ 44%] label_target reading sources... [ 48%] literalblock reading sources... [ 51%] only reading sources... [ 55%] raw reading sources... [ 59%] refs reading sources... [ 62%] refs_inconsistency reading sources... [ 66%] refs_python_domain reading sources... [ 70%] role_xref reading sources... [ 74%] rubric reading sources... [ 77%] section reading sources... [ 81%] seealso reading sources... [ 85%] subdir/contents reading sources... [ 88%] table reading sources... [ 92%] topic reading sources... [ 96%] versionchange reading sources... [100%] warnings looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 50%] contents mdone writing output... [ 3%] admonitions # warning: /<>/tests/build/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [u':term:`Some term`', u':term:`Some other term`'], translated: [u':term:`SOME NEW TERM`'] /<>/tests/build/test_intl_basic/label_target.txt:41: WARNING: Duplicate target name, cannot be used as a unique reference: "duplicated sub section". /<>/tests/build/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found. /<>/tests/build/test_intl_basic/literalblock.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: [u'`download Sphinx`_'], translated: [u'`A3 DOWNLOAD SPHINX `_', u'`A3 DOWNLOAD SPHINX `_'] /<>/tests/build/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`X TIPS `_', u'`X TIPS `_'] /<>/tests/build/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: [u'`Translation Tips`_'], translated: [u'`TRANS `_', u'`LATION `_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[#]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: [u'[100]_'], translated: [] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: [u'reference_'], translated: [u'reference_', u'reference_'] /<>/tests/build/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: [u'`I18N WITH REFS INCONSISTENCY`_'] /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/warnings.txt:4::1: WARNING: Inline literal start-string without end-string. /<>/tests/build/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/only.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/table.txt: WARNING: document isn't included in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. ed in any toctree /<>/tests/build/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced. _________________________________ test_docinfo _________________________________ app = status = warning = @pytest.mark.sphinx('pseudoxml') def test_docinfo(app, status, warning): """ Inspect the 'docinfo' metadata stored in the first node of the document. Note this doesn't give us access to data stored in subsequence blocks that might be considered document metadata, such as 'abstract' or 'dedication' blocks, or the 'meta' role. Doing otherwise is probably more messing with the internals of sphinx than this rare use case merits. """ > app.builder.build(['metadata']) tests/test_metadata.py:27: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'autodoc', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple): node.attributes[att] = list(value) value = node.attributes[att] if isinstance(value, list): for i, val in enumerate(value): if isinstance(val, tuple): value[i] = list(val) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/xml.py:97: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: pseudoxml # srcdir: /<>/tests/build/root # outdir: /<>/tests/build/root/_build/pseudoxml # status: Running Sphinx v1.8.5 loading pickled environment... done updating environment: [] 0 added, 3 changed, 0 removed reading sources... [ 33%] autodoc reading sources... [ 66%] images reading sources... [100%] includes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 20%] autodoc # warning: WARNING: autodoc: failed to import module u'util'; the following exception was raised: No module named util /<>/tests/build/root/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. /<>/tests/build/root/images.txt:9: WARNING: image file not readable: foo.png /<>/tests/build/root/includes.txt:15: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:19: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:31: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:35: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:39: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:44: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:49: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:53: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:56: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:59: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:63: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:68: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:73: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:78: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:83: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:93: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/root/includes.txt:4: WARNING: download file not readable: /<>/tests/build/root/nonexisting.png /<>/tests/build/root/contents.txt:10: WARNING: extensions is already assigned section numbers (nested numbered toctree?) ___________________________ test_quickstart_defaults ___________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_quickstart_defaults0') def test_quickstart_defaults(tempdir): answers = { 'Root path': tempdir, 'Project name': 'Sphinx Test', 'Author name': 'Georg Brandl', 'Project version': '0.1', } qs.term_input = mock_input(answers) d = {} qs.ask_user(d) > qs.generate(d) tests/test_quickstart.py:122: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_quickstart_defaults0/conf.py' content = "# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...# epub_uid = '' # A list of files that should not be packed into the epub file. epub_exclude_files = ['search.html'] " newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ----------------------------- Captured stdout call ----------------------------- Welcome to the Sphinx 1.8.5 quickstart utility. Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets). Enter the root path for documentation. You have two options for placing the build directory for Sphinx output. Either, you use a directory "_build" within the root path, or you separate "source" and "build" directories within the root path. Inside the root directory, two more directories will be created; "_templates" for custom HTML templates and "_static" for custom stylesheets and other static files. You can enter another prefix (such as ".") to replace the underscore. The project name will occur in several places in the built documentation. Sphinx has the notion of a "version" and a "release" for the software. Each version can have multiple releases. For example, for Python the version is something like 2.5 or 3.0, while the release is something like 2.5.1 or 3.0a1. If you don't need this dual structure, just set both to the same value. If the documents are to be written in a language other than English, you can select a language here by its language code. Sphinx will then translate text that it generates into that language. For a list of supported codes, see http://sphinx-doc.org/config.html#confval-language. The file name suffix for source files. Commonly, this is either ".txt" or ".rst". Only files with this suffix are considered documents. One document is special in that it is considered the top node of the "contents tree", that is, it is the root of the hierarchical structure of the documents. Normally, this is "index", but if your "index" document is a custom template, you can also set this to another filename. Indicate which of the following Sphinx extensions should be enabled: A Makefile and a Windows command file can be generated for you so that you only have to run e.g. `make html' instead of invoking sphinx-build directly. Creating file /tmp/pytest-of-buildd/pytest-0/test_quickstart_defaults0/conf.py. _________________________ test_quickstart_all_answers __________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_quickstart_all_answers0') def test_quickstart_all_answers(tempdir): answers = { 'Root path': tempdir, 'Separate source and build': 'y', 'Name prefix for templates': '.', 'Project name': u'STASI™'.encode('utf-8'), 'Author name': u'Wolfgang Schäuble & G\'Beckstein'.encode('utf-8'), 'Project version': '2.0', 'Project release': '2.0.1', 'Project language': 'de', 'Source file suffix': '.txt', 'Name of your master document': 'contents', 'autodoc': 'y', 'doctest': 'yes', 'intersphinx': 'no', 'todo': 'y', 'coverage': 'no', 'imgmath': 'N', 'mathjax': 'no', 'ifconfig': 'no', 'viewcode': 'no', 'githubpages': 'no', 'Create Makefile': 'no', 'Create Windows command file': 'no', 'Do you want to use the epub builder': 'yes', } qs.term_input = mock_input(answers, needanswer=True) qs.TERM_ENCODING = 'utf-8' d = {} qs.ask_user(d) > qs.generate(d) tests/test_quickstart.py:178: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_quickstart_all_answers0/source/conf.py' content = '# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...-------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True ' newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ----------------------------- Captured stdout call ----------------------------- Welcome to the Sphinx 1.8.5 quickstart utility. Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets). Enter the root path for documentation. You have two options for placing the build directory for Sphinx output. Either, you use a directory "_build" within the root path, or you separate "source" and "build" directories within the root path. Inside the root directory, two more directories will be created; "_templates" for custom HTML templates and "_static" for custom stylesheets and other static files. You can enter another prefix (such as ".") to replace the underscore. The project name will occur in several places in the built documentation. Sphinx has the notion of a "version" and a "release" for the software. Each version can have multiple releases. For example, for Python the version is something like 2.5 or 3.0, while the release is something like 2.5.1 or 3.0a1. If you don't need this dual structure, just set both to the same value. If the documents are to be written in a language other than English, you can select a language here by its language code. Sphinx will then translate text that it generates into that language. For a list of supported codes, see http://sphinx-doc.org/config.html#confval-language. The file name suffix for source files. Commonly, this is either ".txt" or ".rst". Only files with this suffix are considered documents. One document is special in that it is considered the top node of the "contents tree", that is, it is the root of the hierarchical structure of the documents. Normally, this is "index", but if your "index" document is a custom template, you can also set this to another filename. Indicate which of the following Sphinx extensions should be enabled: A Makefile and a Windows command file can be generated for you so that you only have to run e.g. `make html' instead of invoking sphinx-build directly. Creating file /tmp/pytest-of-buildd/pytest-0/test_quickstart_all_answers0/source/conf.py. ___________________________ test_generated_files_eol ___________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_generated_files_eol0') def test_generated_files_eol(tempdir): answers = { 'Root path': tempdir, 'Project name': 'Sphinx Test', 'Author name': 'Georg Brandl', 'Project version': '0.1', } qs.term_input = mock_input(answers) d = {} qs.ask_user(d) > qs.generate(d) tests/test_quickstart.py:224: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_generated_files_eol0/conf.py' content = "# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...# epub_uid = '' # A list of files that should not be packed into the epub file. epub_exclude_files = ['search.html'] " newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ----------------------------- Captured stdout call ----------------------------- Welcome to the Sphinx 1.8.5 quickstart utility. Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets). Enter the root path for documentation. You have two options for placing the build directory for Sphinx output. Either, you use a directory "_build" within the root path, or you separate "source" and "build" directories within the root path. Inside the root directory, two more directories will be created; "_templates" for custom HTML templates and "_static" for custom stylesheets and other static files. You can enter another prefix (such as ".") to replace the underscore. The project name will occur in several places in the built documentation. Sphinx has the notion of a "version" and a "release" for the software. Each version can have multiple releases. For example, for Python the version is something like 2.5 or 3.0, while the release is something like 2.5.1 or 3.0a1. If you don't need this dual structure, just set both to the same value. If the documents are to be written in a language other than English, you can select a language here by its language code. Sphinx will then translate text that it generates into that language. For a list of supported codes, see http://sphinx-doc.org/config.html#confval-language. The file name suffix for source files. Commonly, this is either ".txt" or ".rst". Only files with this suffix are considered documents. One document is special in that it is considered the top node of the "contents tree", that is, it is the root of the hierarchical structure of the documents. Normally, this is "index", but if your "index" document is a custom template, you can also set this to another filename. Indicate which of the following Sphinx extensions should be enabled: A Makefile and a Windows command file can be generated for you so that you only have to run e.g. `make html' instead of invoking sphinx-build directly. Creating file /tmp/pytest-of-buildd/pytest-0/test_generated_files_eol0/conf.py. __________________________ test_quickstart_and_build ___________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_quickstart_and_build0') def test_quickstart_and_build(tempdir): answers = { 'Root path': tempdir, 'Project name': u'Fullwidth characters: \u30c9\u30a4\u30c4', 'Author name': 'Georg Brandl', 'Project version': '0.1', } qs.term_input = mock_input(answers) d = {} qs.ask_user(d) > qs.generate(d) tests/test_quickstart.py:244: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_quickstart_and_build0/conf.py' content = "# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...# epub_uid = '' # A list of files that should not be packed into the epub file. epub_exclude_files = ['search.html'] " newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ----------------------------- Captured stdout call ----------------------------- Welcome to the Sphinx 1.8.5 quickstart utility. Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets). Enter the root path for documentation. You have two options for placing the build directory for Sphinx output. Either, you use a directory "_build" within the root path, or you separate "source" and "build" directories within the root path. Inside the root directory, two more directories will be created; "_templates" for custom HTML templates and "_static" for custom stylesheets and other static files. You can enter another prefix (such as ".") to replace the underscore. The project name will occur in several places in the built documentation. Sphinx has the notion of a "version" and a "release" for the software. Each version can have multiple releases. For example, for Python the version is something like 2.5 or 3.0, while the release is something like 2.5.1 or 3.0a1. If you don't need this dual structure, just set both to the same value. If the documents are to be written in a language other than English, you can select a language here by its language code. Sphinx will then translate text that it generates into that language. For a list of supported codes, see http://sphinx-doc.org/config.html#confval-language. The file name suffix for source files. Commonly, this is either ".txt" or ".rst". Only files with this suffix are considered documents. One document is special in that it is considered the top node of the "contents tree", that is, it is the root of the hierarchical structure of the documents. Normally, this is "index", but if your "index" document is a custom template, you can also set this to another filename. Indicate which of the following Sphinx extensions should be enabled: A Makefile and a Windows command file can be generated for you so that you only have to run e.g. `make html' instead of invoking sphinx-build directly. Creating file /tmp/pytest-of-buildd/pytest-0/test_quickstart_and_build0/conf.py. ____________________________ test_default_filename _____________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_default_filename0') def test_default_filename(tempdir): answers = { 'Root path': tempdir, 'Project name': u'\u30c9\u30a4\u30c4', # Fullwidth characters only 'Author name': 'Georg Brandl', 'Project version': '0.1', } qs.term_input = mock_input(answers) d = {} qs.ask_user(d) > qs.generate(d) tests/test_quickstart.py:269: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_default_filename0/conf.py' content = "# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...# epub_uid = '' # A list of files that should not be packed into the epub file. epub_exclude_files = ['search.html'] " newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ----------------------------- Captured stdout call ----------------------------- Welcome to the Sphinx 1.8.5 quickstart utility. Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets). Enter the root path for documentation. You have two options for placing the build directory for Sphinx output. Either, you use a directory "_build" within the root path, or you separate "source" and "build" directories within the root path. Inside the root directory, two more directories will be created; "_templates" for custom HTML templates and "_static" for custom stylesheets and other static files. You can enter another prefix (such as ".") to replace the underscore. The project name will occur in several places in the built documentation. Sphinx has the notion of a "version" and a "release" for the software. Each version can have multiple releases. For example, for Python the version is something like 2.5 or 3.0, while the release is something like 2.5.1 or 3.0a1. If you don't need this dual structure, just set both to the same value. If the documents are to be written in a language other than English, you can select a language here by its language code. Sphinx will then translate text that it generates into that language. For a list of supported codes, see http://sphinx-doc.org/config.html#confval-language. The file name suffix for source files. Commonly, this is either ".txt" or ".rst". Only files with this suffix are considered documents. One document is special in that it is considered the top node of the "contents tree", that is, it is the root of the hierarchical structure of the documents. Normally, this is "index", but if your "index" document is a custom template, you can also set this to another filename. Indicate which of the following Sphinx extensions should be enabled: A Makefile and a Windows command file can be generated for you so that you only have to run e.g. `make html' instead of invoking sphinx-build directly. Creating file /tmp/pytest-of-buildd/pytest-0/test_default_filename0/conf.py. _______________________________ test_extensions ________________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_extensions0') def test_extensions(tempdir): qs.main(['-q', '-p', 'project_name', '-a', 'author', > '--extensions', 'foo,bar,baz', tempdir]) tests/test_quickstart.py:282: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/cmd/quickstart.py:680: in main generate(d, overwrite=False, templatedir=args.templatedir) sphinx/cmd/quickstart.py:459: in generate write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fpath = '/tmp/pytest-of-buildd/pytest-0/test_extensions0/conf.py' content = "# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain ...epub_exclude_files = ['search.html'] # -- Extension configuration ------------------------------------------------- " newline = None def write_file(fpath, content, newline=None): # type: (unicode, unicode, unicode) -> None if overwrite or not path.isfile(fpath): if 'quiet' not in d: print(__('Creating file %s.') % fpath) > with open(fpath, 'wt', encoding='utf-8', newline=newline) as f: # type: ignore E TypeError: file() takes at most 3 arguments (4 given) sphinx/cmd/quickstart.py:447: TypeError ___________________________ test_objects_are_escaped ___________________________ app = status = warning = @pytest.mark.sphinx(testroot='ext-viewcode') def test_objects_are_escaped(app, status, warning): > app.builder.build_all() tests/test_search.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'objects']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/ext-viewcode # outdir: /<>/tests/build/ext-viewcode/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... failed: build environment version not current building [html]: all source files updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] index reading sources... [100%] objects looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: WARNING: error while formatting arguments for spam.Class1: is a builtin class WARNING: error while formatting arguments for spam.Class2: is a builtin class WARNING: error while formatting arguments for spam.mod1.Class1: is a builtin class WARNING: error while formatting arguments for spam.mod2.Class2: is a builtin class /<>/tests/build/ext-viewcode/index.rst:23: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/ext-viewcode/index.rst:27: WARNING: file() takes at most 3 arguments (4 given) /<>/tests/build/ext-viewcode/objects.rst:155: WARNING: Unknown directive type "userdesc". .. userdesc:: myobj:parameter Description of userdesc. /<>/tests/build/ext-viewcode/objects.rst:160: WARNING: Unknown interpreted text role "userdescrole". /<>/tests/build/ext-viewcode/objects.rst:166: WARNING: Too many template argument lists compared to parameter lists. Argument lists: 1, Parameter lists: 0, Extra empty parameters lists prepended: 1. Declaration: n::Array __________________ test_meta_keys_are_handled_for_language_en __________________ app = status = warning = @pytest.mark.sphinx(testroot='search') def test_meta_keys_are_handled_for_language_en(app, status, warning): > app.builder.build_all() tests/test_search.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'tocitem']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/search # outdir: /<>/tests/build/search/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] index reading sources... [100%] tocitem looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________ test_meta_keys_are_handled_for_language_de __________________ app = status = warning = @pytest.mark.sphinx(testroot='search', confoverrides={'html_search_language': 'de'}) def test_meta_keys_are_handled_for_language_de(app, status, warning): > app.builder.build_all() tests/test_search.py:90: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'tocitem']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/search # outdir: /<>/tests/build/search/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: ___________________ test_stemmer_does_not_remove_short_words ___________________ app = status = warning = @pytest.mark.sphinx(testroot='search') def test_stemmer_does_not_remove_short_words(app, status, warning): > app.builder.build_all() tests/test_search.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'tocitem']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/search # outdir: /<>/tests/build/search/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: _________________________________ test_stemmer _________________________________ app = status = warning = @pytest.mark.sphinx(testroot='search') def test_stemmer(app, status, warning): > searchindex = jsload(app.outdir / 'searchindex.js') tests/test_search.py:110: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_search.py:45: in jsload searchindex = path.text() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/search/_build/html/searchindex.js') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/search # outdir: /<>/tests/build/search/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done # warning: _______________________ test_term_in_heading_and_section _______________________ app = status = warning = @pytest.mark.sphinx(testroot='search') def test_term_in_heading_and_section(app, status, warning): > searchindex = (app.outdir / 'searchindex.js').text() tests/test_search.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/search/_build/html/searchindex.js') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/search # outdir: /<>/tests/build/search/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done # warning: __________________________ test_term_in_raw_directive __________________________ app = status = warning = @pytest.mark.sphinx(testroot='search') def test_term_in_raw_directive(app, status, warning): > searchindex = jsload(app.outdir / 'searchindex.js') tests/test_search.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_search.py:45: in jsload searchindex = path.text() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/search/_build/html/searchindex.js') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/search # outdir: /<>/tests/build/search/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done # warning: ___________________________ test_search_index_gen_zh ___________________________ app = status = warning = @pytest.mark.sphinx( testroot='search', confoverrides={'html_search_language': 'zh'}, srcdir='search_zh' ) def test_search_index_gen_zh(app, status, warning): > app.builder.build_all() tests/test_search.py:251: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index', 'tocitem']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/search_zh # outdir: /<>/tests/build/search_zh/_build/html # status: Running Sphinx v1.8.5 building [html]: all source files updating environment: 2 added, 0 changed, 0 removed reading sources... [ 50%] index reading sources... [100%] tocitem looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________________ test_build_sphinx _______________________________ setup_command = setup(pkgroot=path(u'/tmp/pytest-of-buildd/pytest-0/test_build_sphinx0/test-setup'), proc=) def test_build_sphinx(setup_command): proc = setup_command.proc out, err = proc.communicate() print(out) print(err) > assert proc.returncode == 0 E assert 1 == 0 E + where 1 = .returncode /<>/.pybuild/cpython2_2.7/build/tests/test_setup_command.py:59: AssertionError ----------------------------- Captured stdout call ----------------------------- running build_sphinx Running Sphinx v1.8.5 making output directory... building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] contents looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... Exception occurred: File "/<>/.pybuild/cpython2_2.7/build/sphinx/builders/html.py", line 1006, in load_indexer f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore TypeError: 'encoding' is an invalid keyword argument for this function The full traceback has been saved in /tmp/sphinx-err-jtEGic.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at . Thanks! _____________________ test_build_sphinx_multiple_builders ______________________ setup_command = setup(pkgroot=path(u'/tmp/pytest-of-buildd/pytest-0/test_build_sphinx_multiple_bui0/test-setup'), proc=) @pytest.mark.setup_command('-b', 'html,man') def test_build_sphinx_multiple_builders(setup_command): proc = setup_command.proc out, err = proc.communicate() print(out) print(err) > assert proc.returncode == 0 E assert 1 == 0 E + where 1 = .returncode /<>/.pybuild/cpython2_2.7/build/tests/test_setup_command.py:68: AssertionError ----------------------------- Captured stdout call ----------------------------- running build_sphinx Running Sphinx v1.8.5 making output directory... building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] contents looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... Exception occurred: File "/<>/.pybuild/cpython2_2.7/build/sphinx/builders/html.py", line 1006, in load_indexer f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore TypeError: 'encoding' is an invalid keyword argument for this function The full traceback has been saved in /tmp/sphinx-err-PAYkIL.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at . Thanks! ___________________ test_build_sphinx_return_nonzero_status ____________________ setup_command = setup(pkgroot=path(u'/tmp/pytest-of-buildd/pytest-0/test_build_sphinx_return_nonze0/test-setup'), proc=) @pytest.mark.setup_command('-b', 'linkcheck') def test_build_sphinx_return_nonzero_status(setup_command): srcdir = (setup_command.pkgroot / 'doc') (srcdir / 'contents.txt').write_text( > 'http://localhost.unexistentdomain/index.html') /<>/.pybuild/cpython2_2.7/build/tests/test_setup_command.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_build_sphinx_return_nonze0/test-setup/doc/contents.txt') text = 'http://localhost.unexistentdomain/index.html', encoding = 'utf-8' kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError _________________ test_build_sphinx_warning_return_zero_status _________________ setup_command = setup(pkgroot=path(u'/tmp/pytest-of-buildd/pytest-0/test_build_sphinx_warning_retu0/test-setup'), proc=) def test_build_sphinx_warning_return_zero_status(setup_command): srcdir = (setup_command.pkgroot / 'doc') (srcdir / 'contents.txt').write_text( > 'See :ref:`unexisting-reference-label`') /<>/.pybuild/cpython2_2.7/build/tests/test_setup_command.py:129: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_build_sphinx_warning_retu0/test-setup/doc/contents.txt') text = 'See :ref:`unexisting-reference-label`', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ___________ test_build_sphinx_warning_is_error_return_nonzero_status ___________ setup_command = setup(pkgroot=path(u'/tmp/pytest-of-buildd/pytest-0/test_build_sphinx_warning_is_e0/test-setup'), proc=) @pytest.mark.setup_command('--warning-is-error') def test_build_sphinx_warning_is_error_return_nonzero_status(setup_command): srcdir = (setup_command.pkgroot / 'doc') (srcdir / 'contents.txt').write_text( > 'See :ref:`unexisting-reference-label`') /<>/.pybuild/cpython2_2.7/build/tests/test_setup_command.py:141: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_build_sphinx_warning_is_e0/test-setup/doc/contents.txt') text = 'See :ref:`unexisting-reference-label`', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError __________________________________ test_basic __________________________________ app = status = warning = @pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True) def test_basic(app, status, warning): > app.build() tests/test_smartquotes.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/smartquotes # outdir: /<>/tests/build/smartquotes/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________________ test_text_builder _______________________________ app = status = warning = @pytest.mark.sphinx(buildername='text', testroot='smartquotes', freshenv=True) def test_text_builder(app, status, warning): > app.build() tests/test_smartquotes.py:27: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:593: in write self._write_serial(sorted(docnames)) sphinx/builders/__init__.py:604: in _write_serial self.write_doc(docname, doctree) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docname = 'index', doctree = > def write_doc(self, docname, doctree): # type: (unicode, nodes.Node) -> None self.current_docname = docname self.secnumbers = self.env.toc_secnumbers.get(docname, {}) destination = StringOutput(encoding='utf-8') self.writer.write(doctree, destination) outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: > with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/text.py:84: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: text # srcdir: /<>/tests/build/smartquotes # outdir: /<>/tests/build/smartquotes/_build/text # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [text]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] index # warning: _______________________________ test_man_builder _______________________________ app = status = warning = @pytest.mark.sphinx(buildername='man', testroot='smartquotes', freshenv=True) def test_man_builder(app, status, warning): app.build() > content = (app.outdir / 'python.1').text() tests/test_smartquotes.py:37: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/smartquotes/_build/man/python.1') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: man # srcdir: /<>/tests/build/smartquotes # outdir: /<>/tests/build/smartquotes/_build/man # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [man]: all manpages updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done writing... python.1 { } build succeeded. The manual pages are in ../../../tests/build/smartquotes/_build/man. # warning: ______________________________ test_latex_builder ______________________________ app = status = warning = @pytest.mark.sphinx(buildername='latex', testroot='smartquotes', freshenv=True) def test_latex_builder(app, status, warning): > app.build() tests/test_smartquotes.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/smartquotes/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/smartquotes # outdir: /<>/tests/build/smartquotes/_build/latex # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [latex]: all documents updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index resolving references... writing... done copying TeX support files... # warning: _____________________________ test_ja_html_builder _____________________________ app = status = warning = @pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True, confoverrides={'language': 'ja'}) def test_ja_html_builder(app, status, warning): > app.build() tests/test_smartquotes.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/smartquotes # outdir: /<>/tests/build/smartquotes/_build/html # status: Running Sphinx v1.8.5 loading translations [ja]... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: __________________________ test_smartquotes_disabled ___________________________ app = status = warning = @pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True, confoverrides={'smartquotes': False}) def test_smartquotes_disabled(app, status, warning): > app.build() tests/test_smartquotes.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/smartquotes # outdir: /<>/tests/build/smartquotes/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________________ test_smartquotes_action ____________________________ app = status = warning = @pytest.mark.skipif(docutils.__version_info__ < (0, 14), reason='docutils-0.14 or above is required') @pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True, confoverrides={'smartquotes_action': 'q'}) def test_smartquotes_action(app, status, warning): > app.build() tests/test_smartquotes.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/smartquotes # outdir: /<>/tests/build/smartquotes/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________ test_smartquotes_excludes_language ______________________ app = status = warning = @pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True, confoverrides={'language': 'ja', 'smartquotes_excludes': {}}) def test_smartquotes_excludes_language(app, status, warning): > app.build() tests/test_smartquotes.py:81: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/smartquotes # outdir: /<>/tests/build/smartquotes/_build/html # status: Running Sphinx v1.8.5 loading translations [ja]... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ______________________ test_smartquotes_excludes_builders ______________________ app = status = warning = @pytest.mark.sphinx(buildername='man', testroot='smartquotes', freshenv=True, confoverrides={'smartquotes_excludes': {}}) def test_smartquotes_excludes_builders(app, status, warning): app.build() > content = (app.outdir / 'python.1').text() tests/test_smartquotes.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/smartquotes/_build/man/python.1') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: man # srcdir: /<>/tests/build/smartquotes # outdir: /<>/tests/build/smartquotes/_build/man # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [man]: all manpages updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done writing... python.1 { } build succeeded. The manual pages are in ../../../tests/build/smartquotes/_build/man. # warning: ___________________________ test_layout_overloading ____________________________ make_app = app_params = app_params(args=['html'], kwargs={'srcdir': path(u'/<>/tests/build/templating')}) @pytest.mark.sphinx('html', testroot='templating') def test_layout_overloading(make_app, app_params): args, kwargs = app_params > app = make_app(*args, **kwargs) tests/test_templating.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:142: in __init__ freshenv, warningiserror, tags) sphinx/application.py:263: in __init__ self._init_builder() sphinx/application.py:325: in _init_builder self.emit('builder-inited') sphinx/application.py:510: in emit return self.events.emit(event, self, *args) sphinx/events.py:80: in emit results.append(callback(*args)) sphinx/ext/autosummary/__init__.py:696: in process_generate_options app=app) sphinx/ext/autosummary/generate.py:136: in generate_autosummary_docs items = find_autosummary_in_files(sources) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filenames = ['/<>/tests/build/templating/autosummary_templating.txt'] def find_autosummary_in_files(filenames): # type: (List[unicode]) -> List[Tuple[unicode, unicode, unicode]] """Find out what items are documented in source/*.rst. See `find_autosummary_in_lines`. """ documented = [] # type: List[Tuple[unicode, unicode, unicode]] for filename in filenames: with open(filename, 'r', encoding='utf-8', # type: ignore > errors='ignore') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/ext/autosummary/generate.py:252: TypeError _________________ test_autosummary_class_template_overloading __________________ make_app = app_params = app_params(args=['html'], kwargs={'srcdir': path(u'/<>/tests/build/templating')}) @pytest.mark.sphinx('html', testroot='templating') def test_autosummary_class_template_overloading(make_app, app_params): args, kwargs = app_params > app = make_app(*args, **kwargs) tests/test_templating.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/testing/fixtures.py:164: in make app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA sphinx/testing/util.py:142: in __init__ freshenv, warningiserror, tags) sphinx/application.py:263: in __init__ self._init_builder() sphinx/application.py:325: in _init_builder self.emit('builder-inited') sphinx/application.py:510: in emit return self.events.emit(event, self, *args) sphinx/events.py:80: in emit results.append(callback(*args)) sphinx/ext/autosummary/__init__.py:696: in process_generate_options app=app) sphinx/ext/autosummary/generate.py:136: in generate_autosummary_docs items = find_autosummary_in_files(sources) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filenames = ['/<>/tests/build/templating/autosummary_templating.txt'] def find_autosummary_in_files(filenames): # type: (List[unicode]) -> List[Tuple[unicode, unicode, unicode]] """Find out what items are documented in source/*.rst. See `find_autosummary_in_lines`. """ documented = [] # type: List[Tuple[unicode, unicode, unicode]] for filename in filenames: with open(filename, 'r', encoding='utf-8', # type: ignore > errors='ignore') as f: E TypeError: file() takes at most 3 arguments (4 given) sphinx/ext/autosummary/generate.py:252: TypeError _________________________ test_double_inheriting_theme _________________________ app = status = warning = @pytest.mark.sphinx(testroot='double-inheriting-theme') def test_double_inheriting_theme(app, status, warning): assert app.builder.theme.name == 'base_theme2' > app.build() # => not raises TemplateNotFound tests/test_theming.py:97: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/double-inheriting-theme # outdir: /<>/tests/build/double-inheriting-theme/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ___________________________ test_nested_zipped_theme ___________________________ app = status = warning = @pytest.mark.sphinx(testroot='theming', confoverrides={'html_theme': 'child'}) def test_nested_zipped_theme(app, status, warning): assert app.builder.theme.name == 'child' > app.build() # => not raises TemplateNotFound tests/test_theming.py:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/theming # outdir: /<>/tests/build/theming/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _______________________________ test_staticfiles _______________________________ app = status = warning = @pytest.mark.sphinx(testroot='theming', confoverrides={'html_theme': 'staticfiles'}) def test_staticfiles(app, status, warning): > app.build() tests/test_theming.py:110: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/theming # outdir: /<>/tests/build/theming/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: _____________________________ test_theme_sidebars ______________________________ app = status = warning = @pytest.mark.sphinx(testroot='theming') def test_theme_sidebars(app, status, warning): > app.build() tests/test_theming.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/theming # outdir: /<>/tests/build/theming/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ________________________________ test_relations ________________________________ app = status = warning = @pytest.mark.sphinx(testroot='toctree-glob') def test_relations(app, status, warning): > app.builder.build_all() tests/test_toctree.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['bar/bar_1', 'bar/bar_2', 'bar/bar_3', 'bar/bar_4/index', 'bar/index', 'baz', ...]) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/toctree-glob # outdir: /<>/tests/build/toctree-glob/_build/html # status: Running Sphinx v1.8.5 loading pickled environment... done building [html]: all source files updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents...  # warning: ___________________________ test_singlehtml_toctree ____________________________ app = status = warning = @pytest.mark.sphinx('singlehtml', testroot='toctree-empty') def test_singlehtml_toctree(app, status, warning): > app.builder.build_all() tests/test_toctree.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/builders/__init__.py:305: in build_all self.build(None, summary=__('all source files'), method='all') sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/html.py:1412: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = {'index': 1562186680.408546} def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: singlehtml # srcdir: /<>/tests/build/toctree-empty # outdir: /<>/tests/build/toctree-empty/_build/singlehtml # status: Running Sphinx v1.8.5 building [singlehtml]: all source files updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ____________________________ test_numbered_toctree _____________________________ app = status = warning = @pytest.mark.sphinx(testroot='toctree', srcdir="numbered-toctree") def test_numbered_toctree(app, status, warning): # give argument to :numbered: option > index = (app.srcdir / 'index.rst').text() tests/test_toctree.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/<>/tests/build/numbered-toctree/index.rst') encoding = 'utf-8', kwargs = {}, mode = 'rU' def text(self, encoding='utf-8', **kwargs): # type: (unicode, Any) -> unicode """ Returns the text in the file. """ mode = 'rU' if PY2 else 'r' > with open(self, mode=mode, encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:172: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/numbered-toctree # outdir: /<>/tests/build/numbered-toctree/_build/html # status: Running Sphinx v1.8.5 # warning: _________________________ test_trim_doctest_flags_html _________________________ app = status = warning = @pytest.mark.sphinx('html', testroot='trim_doctest_flags') def test_trim_doctest_flags_html(app, status, warning): > app.build() tests/test_transforms_post_transforms_code.py:15: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:347: in build_update len(to_build)) sphinx/builders/__init__.py:412: in build self.write(docnames, list(updated_docnames), method) sphinx/builders/__init__.py:584: in write self.prepare_writing(docnames) sphinx/builders/html.py:541: in prepare_writing self.load_indexer(docnames) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = docnames = set(['index']) def load_indexer(self, docnames): # type: (Iterable[unicode]) -> None keep = set(self.env.all_docs) - set(docnames) try: searchindexfn = path.join(self.outdir, self.searchindex_filename) if self.indexer_dumps_unicode: > f = open(searchindexfn, 'r', encoding='utf-8') # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/builders/html.py:1006: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: html # srcdir: /<>/tests/build/trim_doctest_flags # outdir: /<>/tests/build/trim_doctest_flags/_build/html # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents...  # warning: ________________________ test_trim_doctest_flags_latex _________________________ app = status = warning = @pytest.mark.sphinx('latex', testroot='trim_doctest_flags') def test_trim_doctest_flags_latex(app, status, warning): > app.build() tests/test_transforms_post_transforms_code.py:26: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sphinx/application.py:341: in build self.builder.build_update() sphinx/builders/__init__.py:342: in build_update self.build(['__all__'], to_build) sphinx/builders/__init__.py:415: in build self.finish() sphinx/builders/latex/__init__.py:318: in finish self.outdir, context=context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = '/<>/.pybuild/cpython2_2.7/build/sphinx/texinputs/latexmkrc_t' destination = '/<>/tests/build/trim_doctest_flags/_build/latex/latexmkrc_t' context = {'latex_engine': 'pdflatex', 'xindy_cyrillic': False, 'xindy_lang_option': '-L english -C utf8 ', 'xindy_use': False} renderer = def copy_asset_file(source, destination, context=None, renderer=None): # type: (unicode, unicode, Dict, BaseRenderer) -> None """Copy an asset file to destination. On copying, it expands the template variables if context argument is given and the asset is a template file. :param source: The path to source file :param destination: The path to destination file or directory :param context: The template variables. If not given, template files are simply copied :param renderer: The template engine. If not given, SphinxRenderer is used by default """ if not os.path.exists(source): return if os.path.exists(destination) and os.path.isdir(destination): # Use source filename if destination points a directory destination = os.path.join(destination, os.path.basename(source)) if source.lower().endswith('_t') and context: if renderer is None: from sphinx.util.template import SphinxRenderer renderer = SphinxRenderer() > with open(source, 'r', encoding='utf-8') as fsrc: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/fileutil.py:51: TypeError --------------------------- Captured stdout teardown --------------------------- # testroot: root # builder: latex # srcdir: /<>/tests/build/trim_doctest_flags # outdir: /<>/tests/build/trim_doctest_flags/_build/latex # status: Running Sphinx v1.8.5 building [mo]: targets for 0 po files that are out of date building [latex]: all documents updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done processing test.tex...index resolving references... writing... done copying TeX support files... # warning: ____________________________ test_SphinxFileOutput _____________________________ tmpdir = local('/tmp/pytest-of-buildd/pytest-0/test_SphinxFileOutput0') def test_SphinxFileOutput(tmpdir): content = 'Hello Sphinx World' # write test.txt at first filename = str(tmpdir / 'test.txt') output = SphinxFileOutput(destination_path=filename) output.write(content) os.utime(filename, (0, 0)) # overrite it again output.write(content) assert os.stat(filename).st_mtime != 0 # updated # write test2.txt at first filename = str(tmpdir / 'test2.txt') output = SphinxFileOutput(destination_path=filename, overwrite_if_changed=True) output.write(content) os.utime(filename, (0, 0)) # overrite it again > output.write(content) tests/test_util_docutils.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sphinx.util.docutils.SphinxFileOutput: destination=, destination_path='/tmp/pytest-of-buildd/pytest-0/test_SphinxFileOutput0/test2.txt' data = 'Hello Sphinx World' def write(self, data): # type: (unicode) -> unicode if (self.destination_path and self.autoclose and 'b' not in self.mode and self.overwrite_if_changed and os.path.exists(self.destination_path)): > with open(self.destination_path, encoding=self.encoding) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/util/docutils.py:316: TypeError _____________________________ test_copy_asset_file _____________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_copy_asset_file0') def test_copy_asset_file(tempdir): renderer = DummyTemplateLoader() # copy normal file src = (tempdir / 'asset.txt') > src.write_text('# test data') tests/test_util_fileutil.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_copy_asset_file0/asset.txt') text = '# test data', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError _______________________________ test_copy_asset ________________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_copy_asset0') def test_copy_asset(tempdir): renderer = DummyTemplateLoader() # prepare source files source = (tempdir / 'source') source.makedirs() > (source / 'index.rst').write_text('index.rst') tests/test_util_fileutil.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_copy_asset0/source/index.rst') text = 'index.rst', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ____________________________ test_catalog_outdated _____________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_catalog_outdated0') def test_catalog_outdated(tempdir): > (tempdir / 'test.po').write_text('#') tests/test_util_i18n.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_catalog_outdated0/test.po') text = '#', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ____________________________ test_catalog_write_mo _____________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_catalog_write_mo0') def test_catalog_write_mo(tempdir): > (tempdir / 'test.po').write_text('#') tests/test_util_i18n.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_catalog_write_mo0/test.po') text = '#', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ___________________________ test_get_catalogs_for_xx ___________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_for_xx0') def test_get_catalogs_for_xx(tempdir): (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES').makedirs() > (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / 'test1.po').write_text('#') tests/test_util_i18n.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_for_xx0/loc1/xx/LC_MESSAGES/test1.po') text = '#', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ___________________________ test_get_catalogs_for_en ___________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_for_en0') def test_get_catalogs_for_en(tempdir): (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES').makedirs() > (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / 'xx_dom.po').write_text('#') tests/test_util_i18n.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_for_en0/loc1/xx/LC_MESSAGES/xx_dom.po') text = '#', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError __________________ test_get_catalogs_for_xx_without_outdated ___________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_for_xx_witho0') def test_get_catalogs_for_xx_without_outdated(tempdir): (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES').makedirs() > (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / 'test1.po').write_text('#') tests/test_util_i18n.py:110: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_for_xx_witho0/loc1/xx/LC_MESSAGES/test1.po') text = '#', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError _________________ test_get_catalogs_from_multiple_locale_dirs __________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_from_multipl0') def test_get_catalogs_from_multiple_locale_dirs(tempdir): (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES').makedirs() > (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / 'test1.po').write_text('#') tests/test_util_i18n.py:137: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_from_multipl0/loc1/xx/LC_MESSAGES/test1.po') text = '#', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError ________________________ test_get_catalogs_with_compact ________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_with_compact0') @pytest.mark.filterwarnings('ignore:gettext_compact argument') def test_get_catalogs_with_compact(tempdir): (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES').makedirs() > (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / 'test1.po').write_text('#') tests/test_util_i18n.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_with_compact0/loc1/xx/LC_MESSAGES/test1.po') text = '#', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError __________________________ test_get_catalogs_excluded __________________________ tempdir = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_excluded0') def test_get_catalogs_excluded(tempdir): (tempdir / 'loc1' / 'en' / 'LC_MESSAGES' / '.git').makedirs() > (tempdir / 'loc1' / 'en' / 'LC_MESSAGES' / 'en_dom.po').write_text('#') tests/test_util_i18n.py:163: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path(u'/tmp/pytest-of-buildd/pytest-0/test_get_catalogs_excluded0/loc1/en/LC_MESSAGES/en_dom.po') text = '#', encoding = 'utf-8', kwargs = {} def write_text(self, text, encoding='utf-8', **kwargs): # type: (unicode, unicode, Any) -> None """ Writes the given `text` to the file. """ if isinstance(text, bytes): text = text.decode(encoding) > with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore E TypeError: 'encoding' is an invalid keyword argument for this function sphinx/testing/path.py:163: TypeError =============================== warnings summary =============================== .pybuild/cpython2_2.7/build/tests/test_build_changes.py::test_build /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2131: RemovedInSphinx40Warning: highlightlang directive is deprecated. Please use highlight directive instead. result = directive_instance.run() sphinx/builders/changes.py:68: RemovedInSphinx30Warning: env.versionchanges() is deprecated. Please use ChangeSetDomain instead. if version not in self.env.versionchanges: .pybuild/cpython2_2.7/build/tests/test_build_changes.py::test_no_changes /usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py:2131: RemovedInSphinx40Warning: highlightlang directive is deprecated. Please use highlight directive instead. result = directive_instance.run() sphinx/builders/changes.py:68: RemovedInSphinx30Warning: env.versionchanges() is deprecated. Please use ChangeSetDomain instead. if version not in self.env.versionchanges: -- Docs: https://docs.pytest.org/en/latest/warnings.html 928 failed, 348 passed, 12 skipped, 1 xfailed, 4 warnings, 48 error in 533.32 seconds E: pybuild pybuild:341: test: plugin distutils failed with: exit code=1: cd /<>/.pybuild/cpython2_2.7/build; python2.7 -m pytest --verbose --ignore tests/test_websupport.py --ignore tests/test_api_translator.py dh_auto_test: pybuild --test --test-pytest -i python{version} -p 2.7 returned exit code 13 make: *** [debian/rules:21: build] Error 25 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 -------------------------------------------------------------------------------- Build finished at 20190703-2044 Finished -------- E: Build failure (dpkg-buildpackage died) +------------------------------------------------------------------------------+ | Cleanup | +------------------------------------------------------------------------------+ Purging /<> Not removing build depends: as requested +------------------------------------------------------------------------------+ | Summary | +------------------------------------------------------------------------------+ Build Architecture: amd64 Build-Space: 104568 Build-Time: 566 Distribution: eoan-proposed Fail-Stage: build Host Architecture: amd64 Install-Time: 55 Job: sphinx_1.8.5-1ubuntu2.dsc Machine Architecture: amd64 Package: sphinx Package-Time: 622 Source-Version: 1.8.5-1ubuntu2 Space: 104568 Status: attempted Version: 1.8.5-1ubuntu2 -------------------------------------------------------------------------------- Finished at 20190703-2044 Build needed 00:10:22, 104568k disc space RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=chroot --series=eoan --arch=amd64 PACKAGEBUILD-17190682 Scanning for processes to kill in build PACKAGEBUILD-17190682