Last active
November 28, 2020 08:20
-
-
Save apteryks/8e50f94e14f6dd48fe235d523b40d52c to your computer and use it in GitHub Desktop.
Weasyprint test suite failures on GNU Guix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dependencies: font-dejavu@2.37 fontconfig@2.13.1 gdk-pixbuf@2.40.0 glib@2.62.6 pango@1.44.7 | |
| + python-cairocffi@1.2.0 python-cairosvg@2.5.0 python-cffi@1.14.0 python-cssselect2@0.4.1 | |
| + python-html5lib@1.1 python-pyphen@0.10.0 python-pytest-cov@2.8.1 python-pytest-runner@5.2 | |
| + python-tinycss2@1.1.0 | |
| substitute: | |
| substitute: [Kupdating substitutes from 'https://ci.guix.gnu.org'... 0.0% | |
| substitute: [Kupdating substitutes from 'https://ci.guix.gnu.org'... 100.0% | |
| @ build-started /gnu/store/jidwphw1is0mlphmwaspacl26f0krzqv-weasyprint-52.1.drv - x86_64-linux /var/log/guix/drvs/ji//dwphw1is0mlphmwaspacl26f0krzqv-weasyprint-52.1.drv.bz2 14317 | |
| starting phase `set-SOURCE-DATE-EPOCH' | |
| phase `set-SOURCE-DATE-EPOCH' succeeded after 0.0 seconds | |
| starting phase `set-paths' | |
| environment variable `PATH' set to `/gnu/store/wc4xh9wj49rlbyivxi4lsws6whhzx4ab-python-wrapper-3.8.2/bin:/gnu/store/bf2jmcvrq5qbbnwv8mzxglrkaj2v7232-fontconfig-2.13.1/bin:/gnu/store/dj4w1pxrdm81wqf2phgbay5i20r8g7wv-pango-1.44.7/bin:/gnu/store/hirahvpzx52igjg4z0l4lzfgdfd83bn0-gdk-pixbuf-2.40.0/bin:/gnu/store/vh6qqyv578hkdidy1pxk23kv3bkf93cf-python-cairosvg-2.5.0/bin:/gnu/store/v6f44zccwh9z5zk3pjlywjybbi8n2hjh-tar-1.32/bin:/gnu/store/ncydgq2znms5n1d2k5yqshhf58nsixwv-gzip-1.10/bin:/gnu/store/i8h2pcxqdq07ijm3ibkka8f4smn1w48v-bzip2-1.0.8/bin:/gnu/store/9860f1abqj8wjjnwl8a9v54pdcc3bhgf-xz-5.2.4/bin:/gnu/store/60g7r3l01fd7c58yjbm6krgcwj1jkpwg-file-5.38/bin:/gnu/store/n4n560pfvvw50a9369axw5vj5rrqfj1n-diffutils-3.7/bin:/gnu/store/cd5qf3kcnlq35p9k392pjdpdzpsnds70-patch-2.7.6/bin:/gnu/store/hic7snhayfl7m6cpfqqr73nmm19bpqkg-findutils-4.7.0/bin:/gnu/store/swqdvwri9dbv6zssg6v0by7l05hd6wxp-gawk-5.0.1/bin:/gnu/store/ishk7fswcs4gkwcp8mh788z4mvvl9bxh-sed-4.8/bin:/gnu/store/bhs4rj58v8j1narb2454raan2ps38xd8-grep-3.4/bin:/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32/bin:/gnu/store/hm40bxnv8jxmbc1lpb7zfimii4xm9m81-make-4.3/bin:/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin:/gnu/store/mpa04aq8lblbcviyxywxcsb1zbi0mf39-ld-wrapper-0/bin:/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin:/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/bin:/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/bin:/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/sbin:/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/bin:/gnu/store/3bk454z353a42l1l4yaxa6lrl3dh24mv-python-pytest-5.3.5/bin:/gnu/store/9fcmz457dvb4qj6jwmr9ydcdindxhvsl-python-coverage-5.0.3/bin:/gnu/store/haaam6v8l4s75mj9xmpb9gc78xk001y9-freetype-2.10.1/bin:/gnu/store/imh5xxqw10dql4crlngbbjh4r24raf4j-expat-2.2.9/bin:/gnu/store/sh764z2hm5qcr4cqx4amcipcbkvg76i2-libselinux-3.0/sbin:/gnu/store/llccvnpm1dm94d7lndrhs2m6421p45pd-fribidi-1.0.9/bin:/gnu/store/wnm4fijksgfgal7xqvi4ismy7qcc2nis-cairo-1.16.0/bin:/gnu/store/gpvwv9nff7k9l9nmyyqi9w9bzc8j0186-shared-mime-info-1.15/bin:/gnu/store/3x2kak8abb6z2klch72kfff2qxzv00pj-libpng-1.6.37/bin:/gnu/store/8nh0hbrr8iaz6qkwavcnzi0824f3xb68-libsepol-3.0/bin:/gnu/store/qizplwwgqwyq6qmz1i6jlaib5kgzrgwq-icu4c-66.1/bin:/gnu/store/qizplwwgqwyq6qmz1i6jlaib5kgzrgwq-icu4c-66.1/sbin:/gnu/store/avjxs6qgyginkiq6qpk9280zakkaj35h-graphite2-1.3.13/bin' | |
| environment variable `PYTHONPATH' set to `/gnu/store/jambbwx92axfs36k8j5q0l7pjqnj1pl3-python-pytest-cov-2.8.1/lib/python3.8/site-packages:/gnu/store/6pnsqg6sm2dv48bldyqs4c3sa589j9f9-python-pytest-runner-5.2/lib/python3.8/site-packages:/gnu/store/m46j867x71q45cgzcqk8j102ik3l7kza-python-cairocffi-1.2.0/lib/python3.8/site-packages:/gnu/store/vh6qqyv578hkdidy1pxk23kv3bkf93cf-python-cairosvg-2.5.0/lib/python3.8/site-packages:/gnu/store/2lagn19nyzrhim0zn1c39i90qa60zcja-python-cffi-1.14.0/lib/python3.8/site-packages:/gnu/store/768gnalsyq36f3p77wbqdswhhxk7pxmf-python-cssselect2-0.4.1/lib/python3.8/site-packages:/gnu/store/0wjnd4in8w95fn93334ljxz5b936ibpd-python-html5lib-1.1/lib/python3.8/site-packages:/gnu/store/p3mjf635qhzb8q4kd2fgzmsyl7l9cdd4-python-pyphen-0.10.0/lib/python3.8/site-packages:/gnu/store/5i7dnnkis4zfljs75sanpr0jl9ycz6jw-python-tinycss2-1.1.0/lib/python3.8/site-packages:/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages:/gnu/store/3bk454z353a42l1l4yaxa6lrl3dh24mv-python-pytest-5.3.5/lib/python3.8/site-packages:/gnu/store/9fcmz457dvb4qj6jwmr9ydcdindxhvsl-python-coverage-5.0.3/lib/python3.8/site-packages:/gnu/store/brfl5rvq1jh93lkcnz25ywaggzxc5xks-python-xcffib-0.6.0/lib/python3.8/site-packages:/gnu/store/6ja0r94dg3fbsb22p0sqchhvimyw49gd-python-pillow-8.0.1/lib/python3.8/site-packages:/gnu/store/8gdl9sf6h6bin2i3dhad76z105ayk7xr-python-defusedxml-0.6.0/lib/python3.8/site-packages:/gnu/store/nqssc5g3s2gw9h8kfv93ykf8g2wf780h-python-pycparser-2.20/lib/python3.8/site-packages:/gnu/store/p632jxixydya1rh2f1sgwid27np1yvv5-python-webencodings-0.5.1/lib/python3.8/site-packages:/gnu/store/b0svsfz2vw2qwlfsi56k8fwbx4fzcfhk-python-six-1.14.0/lib/python3.8/site-packages:/gnu/store/mnk5rp12lrnm30471idpdfia8riv0m01-python-wcwidth-0.1.8/lib/python3.8/site-packages:/gnu/store/jk078364fi37sm2yyrmnla1d6d4bjwb5-python-six-bootstrap-1.14.0/lib/python3.8/site-packages:/gnu/store/hh397yagghj2nrpwv9cdc6cgqwbrk4yx-python-py-1.8.1/lib/python3.8/site-packages:/gnu/store/p0wphmjxi2mn1i72m1bq2mbfbq5d706h-python-pluggy-0.13.1/lib/python3.8/site-packages:/gnu/store/gfinivfp1knczz2lg1d0q5p6jasslal8-python-packaging-bootstrap-20.0/lib/python3.8/site-packages:/gnu/store/avamm2w7dw3hinrixx09h6dvw8m3mili-python-more-itertools-8.2.0/lib/python3.8/site-packages:/gnu/store/l72vqwgkc23pvvp00pzmkjqraa9g78wl-python-attrs-bootstrap-19.3.0/lib/python3.8/site-packages:/gnu/store/09c14l4iag378c706ygyj8apan1xwq83-python-atomicwrites-1.3.0/lib/python3.8/site-packages:/gnu/store/mw5p6slda60cw309dfqmfzmna064xp76-python-olefile-0.46/lib/python3.8/site-packages:/gnu/store/y4n225qk6limj4yxplscppwqcaan49hw-python-pyparsing-2.4.6/lib/python3.8/site-packages' | |
| environment variable `XDG_DATA_DIRS' set to `/gnu/store/7y3lvk3xf4im8n44337mc6y0ccysvfia-font-dejavu-2.37/share:/gnu/store/jambbwx92axfs36k8j5q0l7pjqnj1pl3-python-pytest-cov-2.8.1/share:/gnu/store/6pnsqg6sm2dv48bldyqs4c3sa589j9f9-python-pytest-runner-5.2/share:/gnu/store/bf2jmcvrq5qbbnwv8mzxglrkaj2v7232-fontconfig-2.13.1/share:/gnu/store/rmbxm1fg47b347kv1h5fb2w04nxqbsj6-glib-2.62.6/share:/gnu/store/dj4w1pxrdm81wqf2phgbay5i20r8g7wv-pango-1.44.7/share:/gnu/store/hirahvpzx52igjg4z0l4lzfgdfd83bn0-gdk-pixbuf-2.40.0/share:/gnu/store/m46j867x71q45cgzcqk8j102ik3l7kza-python-cairocffi-1.2.0/share:/gnu/store/vh6qqyv578hkdidy1pxk23kv3bkf93cf-python-cairosvg-2.5.0/share:/gnu/store/2lagn19nyzrhim0zn1c39i90qa60zcja-python-cffi-1.14.0/share:/gnu/store/768gnalsyq36f3p77wbqdswhhxk7pxmf-python-cssselect2-0.4.1/share:/gnu/store/0wjnd4in8w95fn93334ljxz5b936ibpd-python-html5lib-1.1/share:/gnu/store/p3mjf635qhzb8q4kd2fgzmsyl7l9cdd4-python-pyphen-0.10.0/share:/gnu/store/5i7dnnkis4zfljs75sanpr0jl9ycz6jw-python-tinycss2-1.1.0/share:/gnu/store/v6f44zccwh9z5zk3pjlywjybbi8n2hjh-tar-1.32/share:/gnu/store/ncydgq2znms5n1d2k5yqshhf58nsixwv-gzip-1.10/share:/gnu/store/i8h2pcxqdq07ijm3ibkka8f4smn1w48v-bzip2-1.0.8/share:/gnu/store/9860f1abqj8wjjnwl8a9v54pdcc3bhgf-xz-5.2.4/share:/gnu/store/60g7r3l01fd7c58yjbm6krgcwj1jkpwg-file-5.38/share:/gnu/store/n4n560pfvvw50a9369axw5vj5rrqfj1n-diffutils-3.7/share:/gnu/store/cd5qf3kcnlq35p9k392pjdpdzpsnds70-patch-2.7.6/share:/gnu/store/hic7snhayfl7m6cpfqqr73nmm19bpqkg-findutils-4.7.0/share:/gnu/store/swqdvwri9dbv6zssg6v0by7l05hd6wxp-gawk-5.0.1/share:/gnu/store/ishk7fswcs4gkwcp8mh788z4mvvl9bxh-sed-4.8/share:/gnu/store/bhs4rj58v8j1narb2454raan2ps38xd8-grep-3.4/share:/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32/share:/gnu/store/hm40bxnv8jxmbc1lpb7zfimii4xm9m81-make-4.3/share:/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/share:/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/share:/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/share:/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/share:/gnu/store/s3dcqzwqaakv1yx37by9chksdbkgih17-glibc-2.31-static/share:/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/share:/gnu/store/3bk454z353a42l1l4yaxa6lrl3dh24mv-python-pytest-5.3.5/share:/gnu/store/9fcmz457dvb4qj6jwmr9ydcdindxhvsl-python-coverage-5.0.3/share:/gnu/store/a45p39mgqvfd8kjwibyr0q42k1mw7gmf-util-linux-2.35.1-lib/share:/gnu/store/haaam6v8l4s75mj9xmpb9gc78xk001y9-freetype-2.10.1/share:/gnu/store/imh5xxqw10dql4crlngbbjh4r24raf4j-expat-2.2.9/share:/gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib-1.2.11/share:/gnu/store/sh764z2hm5qcr4cqx4amcipcbkvg76i2-libselinux-3.0/share:/gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi-3.3/share:/gnu/store/k0aqiy7yx8n28dvm3f0a04ka5sd8y950-pcre-8.44/share:/gnu/store/igp2w6cmdax5fj0nylr9vf61m65kl4r2-libxft-2.3.3/share:/gnu/store/3jzvmv2an5aw4m0mpg949knrm8r3nwxy-harfbuzz-2.6.4/share:/gnu/store/llccvnpm1dm94d7lndrhs2m6421p45pd-fribidi-1.0.9/share:/gnu/store/wnm4fijksgfgal7xqvi4ismy7qcc2nis-cairo-1.16.0/share:/gnu/store/gpvwv9nff7k9l9nmyyqi9w9bzc8j0186-shared-mime-info-1.15/share:/gnu/store/3x2kak8abb6z2klch72kfff2qxzv00pj-libpng-1.6.37/share:/gnu/store/brfl5rvq1jh93lkcnz25ywaggzxc5xks-python-xcffib-0.6.0/share:/gnu/store/6ja0r94dg3fbsb22p0sqchhvimyw49gd-python-pillow-8.0.1/share:/gnu/store/8gdl9sf6h6bin2i3dhad76z105ayk7xr-python-defusedxml-0.6.0/share:/gnu/store/nqssc5g3s2gw9h8kfv93ykf8g2wf780h-python-pycparser-2.20/share:/gnu/store/b0svsfz2vw2qwlfsi56k8fwbx4fzcfhk-python-six-1.14.0/share:/gnu/store/gfapkk5c6hvl1d94m4sqnhn7f9l5gqyh-linux-libre-headers-5.4.20/share:/gnu/store/mnk5rp12lrnm30471idpdfia8riv0m01-python-wcwidth-0.1.8/share:/gnu/store/jk078364fi37sm2yyrmnla1d6d4bjwb5-python-six-bootstrap-1.14.0/share:/gnu/store/hh397yagghj2nrpwv9cdc6cgqwbrk4yx-python-py-1.8.1/share:/gnu/store/p0wphmjxi2mn1i72m1bq2mbfbq5d706h-python-pluggy-0.13.1/share:/gnu/store/gfinivfp1knczz2lg1d0q5p6jasslal8-python-packaging-bootstrap-20.0/share:/gnu/store/avamm2w7dw3hinrixx09h6dvw8m3mili-python-more-itertools-8.2.0/share:/gnu/store/l72vqwgkc23pvvp00pzmkjqraa9g78wl-python-attrs-bootstrap-19.3.0/share:/gnu/store/09c14l4iag378c706ygyj8apan1xwq83-python-atomicwrites-1.3.0/share:/gnu/store/8nh0hbrr8iaz6qkwavcnzi0824f3xb68-libsepol-3.0/share:/gnu/store/2mbh4bhhmkhm7188c7rqwzbm5lap0cc9-libxrender-0.9.10/share:/gnu/store/qizplwwgqwyq6qmz1i6jlaib5kgzrgwq-icu4c-66.1/share:/gnu/store/avjxs6qgyginkiq6qpk9280zakkaj35h-graphite2-1.3.13/share:/gnu/store/xwl0p4m34bcan0v9vkjkyzwi6znsv4dm-pixman-0.38.4/share:/gnu/store/2hpgzimhi1vg9n8xagvmqh5sf96svz8q-libxext-1.3.4/share:/gnu/store/nab7hhw326cpmpwyc1rgm0q8sk464qry-libx11-1.6.9/share:/gnu/store/mw5p6slda60cw309dfqmfzmna064xp76-python-olefile-0.46/share:/gnu/store/y4n225qk6limj4yxplscppwqcaan49hw-python-pyparsing-2.4.6/share:/gnu/store/wxl57nkbqgamfp73b7v62kk3f1hiv0cz-xorgproto-2019.2/share:/gnu/store/a8gdwnmpryd39jixzy4xs9p4i7gy17qv-libxcb-1.14/share:/gnu/store/lc8irxnwazq340ygkbqh0ask446jzy9k-util-macros-1.19.2/share:/gnu/store/6cdl970wcv4jhvpgbh8sdj54a5gwhmwj-libxdmcp-1.1.3/share:/gnu/store/h7sy4hr7arjknbyy1aq0xwv6fksnzw9n-libxau-1.0.9/share:/gnu/store/klk98l8czl05lvanrr7xl7a9hksac4ak-libpthread-stubs-0.4/share' | |
| environment variable `GIO_EXTRA_MODULES' unset | |
| environment variable `BASH_LOADABLES_PATH' unset | |
| environment variable `C_INCLUDE_PATH' set to `/gnu/store/bf2jmcvrq5qbbnwv8mzxglrkaj2v7232-fontconfig-2.13.1/include:/gnu/store/rmbxm1fg47b347kv1h5fb2w04nxqbsj6-glib-2.62.6/include:/gnu/store/dj4w1pxrdm81wqf2phgbay5i20r8g7wv-pango-1.44.7/include:/gnu/store/hirahvpzx52igjg4z0l4lzfgdfd83bn0-gdk-pixbuf-2.40.0/include:/gnu/store/i8h2pcxqdq07ijm3ibkka8f4smn1w48v-bzip2-1.0.8/include:/gnu/store/9860f1abqj8wjjnwl8a9v54pdcc3bhgf-xz-5.2.4/include:/gnu/store/60g7r3l01fd7c58yjbm6krgcwj1jkpwg-file-5.38/include:/gnu/store/swqdvwri9dbv6zssg6v0by7l05hd6wxp-gawk-5.0.1/include:/gnu/store/hm40bxnv8jxmbc1lpb7zfimii4xm9m81-make-4.3/include:/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/include:/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/include:/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/include:/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/include:/gnu/store/a45p39mgqvfd8kjwibyr0q42k1mw7gmf-util-linux-2.35.1-lib/include:/gnu/store/haaam6v8l4s75mj9xmpb9gc78xk001y9-freetype-2.10.1/include:/gnu/store/imh5xxqw10dql4crlngbbjh4r24raf4j-expat-2.2.9/include:/gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib-1.2.11/include:/gnu/store/sh764z2hm5qcr4cqx4amcipcbkvg76i2-libselinux-3.0/include:/gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi-3.3/include:/gnu/store/k0aqiy7yx8n28dvm3f0a04ka5sd8y950-pcre-8.44/include:/gnu/store/igp2w6cmdax5fj0nylr9vf61m65kl4r2-libxft-2.3.3/include:/gnu/store/3jzvmv2an5aw4m0mpg949knrm8r3nwxy-harfbuzz-2.6.4/include:/gnu/store/llccvnpm1dm94d7lndrhs2m6421p45pd-fribidi-1.0.9/include:/gnu/store/wnm4fijksgfgal7xqvi4ismy7qcc2nis-cairo-1.16.0/include:/gnu/store/3x2kak8abb6z2klch72kfff2qxzv00pj-libpng-1.6.37/include:/gnu/store/gfapkk5c6hvl1d94m4sqnhn7f9l5gqyh-linux-libre-headers-5.4.20/include:/gnu/store/8nh0hbrr8iaz6qkwavcnzi0824f3xb68-libsepol-3.0/include:/gnu/store/2mbh4bhhmkhm7188c7rqwzbm5lap0cc9-libxrender-0.9.10/include:/gnu/store/qizplwwgqwyq6qmz1i6jlaib5kgzrgwq-icu4c-66.1/include:/gnu/store/avjxs6qgyginkiq6qpk9280zakkaj35h-graphite2-1.3.13/include:/gnu/store/xwl0p4m34bcan0v9vkjkyzwi6znsv4dm-pixman-0.38.4/include:/gnu/store/2hpgzimhi1vg9n8xagvmqh5sf96svz8q-libxext-1.3.4/include:/gnu/store/nab7hhw326cpmpwyc1rgm0q8sk464qry-libx11-1.6.9/include:/gnu/store/wxl57nkbqgamfp73b7v62kk3f1hiv0cz-xorgproto-2019.2/include:/gnu/store/a8gdwnmpryd39jixzy4xs9p4i7gy17qv-libxcb-1.14/include:/gnu/store/6cdl970wcv4jhvpgbh8sdj54a5gwhmwj-libxdmcp-1.1.3/include:/gnu/store/h7sy4hr7arjknbyy1aq0xwv6fksnzw9n-libxau-1.0.9/include' | |
| environment variable `CPLUS_INCLUDE_PATH' set to `/gnu/store/bf2jmcvrq5qbbnwv8mzxglrkaj2v7232-fontconfig-2.13.1/include:/gnu/store/rmbxm1fg47b347kv1h5fb2w04nxqbsj6-glib-2.62.6/include:/gnu/store/dj4w1pxrdm81wqf2phgbay5i20r8g7wv-pango-1.44.7/include:/gnu/store/hirahvpzx52igjg4z0l4lzfgdfd83bn0-gdk-pixbuf-2.40.0/include:/gnu/store/i8h2pcxqdq07ijm3ibkka8f4smn1w48v-bzip2-1.0.8/include:/gnu/store/9860f1abqj8wjjnwl8a9v54pdcc3bhgf-xz-5.2.4/include:/gnu/store/60g7r3l01fd7c58yjbm6krgcwj1jkpwg-file-5.38/include:/gnu/store/swqdvwri9dbv6zssg6v0by7l05hd6wxp-gawk-5.0.1/include:/gnu/store/hm40bxnv8jxmbc1lpb7zfimii4xm9m81-make-4.3/include:/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/include:/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/include/c++:/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/include:/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/include:/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/include:/gnu/store/a45p39mgqvfd8kjwibyr0q42k1mw7gmf-util-linux-2.35.1-lib/include:/gnu/store/haaam6v8l4s75mj9xmpb9gc78xk001y9-freetype-2.10.1/include:/gnu/store/imh5xxqw10dql4crlngbbjh4r24raf4j-expat-2.2.9/include:/gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib-1.2.11/include:/gnu/store/sh764z2hm5qcr4cqx4amcipcbkvg76i2-libselinux-3.0/include:/gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi-3.3/include:/gnu/store/k0aqiy7yx8n28dvm3f0a04ka5sd8y950-pcre-8.44/include:/gnu/store/igp2w6cmdax5fj0nylr9vf61m65kl4r2-libxft-2.3.3/include:/gnu/store/3jzvmv2an5aw4m0mpg949knrm8r3nwxy-harfbuzz-2.6.4/include:/gnu/store/llccvnpm1dm94d7lndrhs2m6421p45pd-fribidi-1.0.9/include:/gnu/store/wnm4fijksgfgal7xqvi4ismy7qcc2nis-cairo-1.16.0/include:/gnu/store/3x2kak8abb6z2klch72kfff2qxzv00pj-libpng-1.6.37/include:/gnu/store/gfapkk5c6hvl1d94m4sqnhn7f9l5gqyh-linux-libre-headers-5.4.20/include:/gnu/store/8nh0hbrr8iaz6qkwavcnzi0824f3xb68-libsepol-3.0/include:/gnu/store/2mbh4bhhmkhm7188c7rqwzbm5lap0cc9-libxrender-0.9.10/include:/gnu/store/qizplwwgqwyq6qmz1i6jlaib5kgzrgwq-icu4c-66.1/include:/gnu/store/avjxs6qgyginkiq6qpk9280zakkaj35h-graphite2-1.3.13/include:/gnu/store/xwl0p4m34bcan0v9vkjkyzwi6znsv4dm-pixman-0.38.4/include:/gnu/store/2hpgzimhi1vg9n8xagvmqh5sf96svz8q-libxext-1.3.4/include:/gnu/store/nab7hhw326cpmpwyc1rgm0q8sk464qry-libx11-1.6.9/include:/gnu/store/wxl57nkbqgamfp73b7v62kk3f1hiv0cz-xorgproto-2019.2/include:/gnu/store/a8gdwnmpryd39jixzy4xs9p4i7gy17qv-libxcb-1.14/include:/gnu/store/6cdl970wcv4jhvpgbh8sdj54a5gwhmwj-libxdmcp-1.1.3/include:/gnu/store/h7sy4hr7arjknbyy1aq0xwv6fksnzw9n-libxau-1.0.9/include' | |
| environment variable `LIBRARY_PATH' set to `/gnu/store/jambbwx92axfs36k8j5q0l7pjqnj1pl3-python-pytest-cov-2.8.1/lib:/gnu/store/6pnsqg6sm2dv48bldyqs4c3sa589j9f9-python-pytest-runner-5.2/lib:/gnu/store/bf2jmcvrq5qbbnwv8mzxglrkaj2v7232-fontconfig-2.13.1/lib:/gnu/store/rmbxm1fg47b347kv1h5fb2w04nxqbsj6-glib-2.62.6/lib:/gnu/store/dj4w1pxrdm81wqf2phgbay5i20r8g7wv-pango-1.44.7/lib:/gnu/store/hirahvpzx52igjg4z0l4lzfgdfd83bn0-gdk-pixbuf-2.40.0/lib:/gnu/store/m46j867x71q45cgzcqk8j102ik3l7kza-python-cairocffi-1.2.0/lib:/gnu/store/vh6qqyv578hkdidy1pxk23kv3bkf93cf-python-cairosvg-2.5.0/lib:/gnu/store/2lagn19nyzrhim0zn1c39i90qa60zcja-python-cffi-1.14.0/lib:/gnu/store/768gnalsyq36f3p77wbqdswhhxk7pxmf-python-cssselect2-0.4.1/lib:/gnu/store/0wjnd4in8w95fn93334ljxz5b936ibpd-python-html5lib-1.1/lib:/gnu/store/p3mjf635qhzb8q4kd2fgzmsyl7l9cdd4-python-pyphen-0.10.0/lib:/gnu/store/5i7dnnkis4zfljs75sanpr0jl9ycz6jw-python-tinycss2-1.1.0/lib:/gnu/store/i8h2pcxqdq07ijm3ibkka8f4smn1w48v-bzip2-1.0.8/lib:/gnu/store/9860f1abqj8wjjnwl8a9v54pdcc3bhgf-xz-5.2.4/lib:/gnu/store/60g7r3l01fd7c58yjbm6krgcwj1jkpwg-file-5.38/lib:/gnu/store/swqdvwri9dbv6zssg6v0by7l05hd6wxp-gawk-5.0.1/lib:/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/lib:/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/lib:/gnu/store/s3dcqzwqaakv1yx37by9chksdbkgih17-glibc-2.31-static/lib:/gnu/store/hwcky7446s952w0mwchhmm211ll07zrq-glibc-utf8-locales-2.31/lib:/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib:/gnu/store/3bk454z353a42l1l4yaxa6lrl3dh24mv-python-pytest-5.3.5/lib:/gnu/store/9fcmz457dvb4qj6jwmr9ydcdindxhvsl-python-coverage-5.0.3/lib:/gnu/store/a45p39mgqvfd8kjwibyr0q42k1mw7gmf-util-linux-2.35.1-lib/lib:/gnu/store/haaam6v8l4s75mj9xmpb9gc78xk001y9-freetype-2.10.1/lib:/gnu/store/imh5xxqw10dql4crlngbbjh4r24raf4j-expat-2.2.9/lib:/gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib-1.2.11/lib:/gnu/store/sh764z2hm5qcr4cqx4amcipcbkvg76i2-libselinux-3.0/lib:/gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi-3.3/lib:/gnu/store/k0aqiy7yx8n28dvm3f0a04ka5sd8y950-pcre-8.44/lib:/gnu/store/igp2w6cmdax5fj0nylr9vf61m65kl4r2-libxft-2.3.3/lib:/gnu/store/3jzvmv2an5aw4m0mpg949knrm8r3nwxy-harfbuzz-2.6.4/lib:/gnu/store/llccvnpm1dm94d7lndrhs2m6421p45pd-fribidi-1.0.9/lib:/gnu/store/wnm4fijksgfgal7xqvi4ismy7qcc2nis-cairo-1.16.0/lib:/gnu/store/3x2kak8abb6z2klch72kfff2qxzv00pj-libpng-1.6.37/lib:/gnu/store/brfl5rvq1jh93lkcnz25ywaggzxc5xks-python-xcffib-0.6.0/lib:/gnu/store/6ja0r94dg3fbsb22p0sqchhvimyw49gd-python-pillow-8.0.1/lib:/gnu/store/8gdl9sf6h6bin2i3dhad76z105ayk7xr-python-defusedxml-0.6.0/lib:/gnu/store/nqssc5g3s2gw9h8kfv93ykf8g2wf780h-python-pycparser-2.20/lib:/gnu/store/p632jxixydya1rh2f1sgwid27np1yvv5-python-webencodings-0.5.1/lib:/gnu/store/b0svsfz2vw2qwlfsi56k8fwbx4fzcfhk-python-six-1.14.0/lib:/gnu/store/mnk5rp12lrnm30471idpdfia8riv0m01-python-wcwidth-0.1.8/lib:/gnu/store/jk078364fi37sm2yyrmnla1d6d4bjwb5-python-six-bootstrap-1.14.0/lib:/gnu/store/hh397yagghj2nrpwv9cdc6cgqwbrk4yx-python-py-1.8.1/lib:/gnu/store/p0wphmjxi2mn1i72m1bq2mbfbq5d706h-python-pluggy-0.13.1/lib:/gnu/store/gfinivfp1knczz2lg1d0q5p6jasslal8-python-packaging-bootstrap-20.0/lib:/gnu/store/avamm2w7dw3hinrixx09h6dvw8m3mili-python-more-itertools-8.2.0/lib:/gnu/store/l72vqwgkc23pvvp00pzmkjqraa9g78wl-python-attrs-bootstrap-19.3.0/lib:/gnu/store/09c14l4iag378c706ygyj8apan1xwq83-python-atomicwrites-1.3.0/lib:/gnu/store/8nh0hbrr8iaz6qkwavcnzi0824f3xb68-libsepol-3.0/lib:/gnu/store/2mbh4bhhmkhm7188c7rqwzbm5lap0cc9-libxrender-0.9.10/lib:/gnu/store/qizplwwgqwyq6qmz1i6jlaib5kgzrgwq-icu4c-66.1/lib:/gnu/store/avjxs6qgyginkiq6qpk9280zakkaj35h-graphite2-1.3.13/lib:/gnu/store/xwl0p4m34bcan0v9vkjkyzwi6znsv4dm-pixman-0.38.4/lib:/gnu/store/2hpgzimhi1vg9n8xagvmqh5sf96svz8q-libxext-1.3.4/lib:/gnu/store/nab7hhw326cpmpwyc1rgm0q8sk464qry-libx11-1.6.9/lib:/gnu/store/mw5p6slda60cw309dfqmfzmna064xp76-python-olefile-0.46/lib:/gnu/store/y4n225qk6limj4yxplscppwqcaan49hw-python-pyparsing-2.4.6/lib:/gnu/store/a8gdwnmpryd39jixzy4xs9p4i7gy17qv-libxcb-1.14/lib:/gnu/store/lc8irxnwazq340ygkbqh0ask446jzy9k-util-macros-1.19.2/lib:/gnu/store/6cdl970wcv4jhvpgbh8sdj54a5gwhmwj-libxdmcp-1.1.3/lib:/gnu/store/h7sy4hr7arjknbyy1aq0xwv6fksnzw9n-libxau-1.0.9/lib:/gnu/store/klk98l8czl05lvanrr7xl7a9hksac4ak-libpthread-stubs-0.4/lib' | |
| environment variable `GUIX_LOCPATH' set to `/gnu/store/hwcky7446s952w0mwchhmm211ll07zrq-glibc-utf8-locales-2.31/lib/locale' | |
| phase `set-paths' succeeded after 0.0 seconds | |
| starting phase `install-locale' | |
| using 'en_US.utf8' locale for category "LC_ALL" | |
| phase `install-locale' succeeded after 0.0 seconds | |
| starting phase `unpack' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/.gitignore' -> `./.gitignore' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/LICENSE' -> `./LICENSE' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/NEWS.rst' -> `./NEWS.rst' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/README.rst' -> `./README.rst' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/setup.cfg' -> `./setup.cfg' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/setup.py' -> `./setup.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/VERSION' -> `./weasyprint/VERSION' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/__init__.py' -> `./weasyprint/__init__.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/__main__.py' -> `./weasyprint/__main__.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/document.py' -> `./weasyprint/document.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/draw.py' -> `./weasyprint/draw.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/fonts.py' -> `./weasyprint/fonts.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/html.py' -> `./weasyprint/html.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/images.py' -> `./weasyprint/images.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/logger.py' -> `./weasyprint/logger.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/pdf.py' -> `./weasyprint/pdf.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/stacking.py' -> `./weasyprint/stacking.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/text.py' -> `./weasyprint/text.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/urls.py' -> `./weasyprint/urls.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tools/navigator.py' -> `./weasyprint/tools/navigator.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tools/renderer.py' -> `./weasyprint/tools/renderer.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tools/__init__.py' -> `./weasyprint/tools/__init__.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/__init__.py' -> `./weasyprint/tests/__init__.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_acid2.py' -> `./weasyprint/tests/test_acid2.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_api.py' -> `./weasyprint/tests/test_api.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_boxes.py' -> `./weasyprint/tests/test_boxes.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_counters.py' -> `./weasyprint/tests/test_counters.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_css.py' -> `./weasyprint/tests/test_css.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_css_descriptors.py' -> `./weasyprint/tests/test_css_descriptors.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_css_validation.py' -> `./weasyprint/tests/test_css_validation.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_float.py' -> `./weasyprint/tests/test_float.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_fonts.py' -> `./weasyprint/tests/test_fonts.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_pdf.py' -> `./weasyprint/tests/test_pdf.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_presentational_hints.py' -> `./weasyprint/tests/test_presentational_hints.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_stacking.py' -> `./weasyprint/tests/test_stacking.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_target.py' -> `./weasyprint/tests/test_target.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_text.py' -> `./weasyprint/tests/test_text.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_tools.py' -> `./weasyprint/tests/test_tools.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_unicode.py' -> `./weasyprint/tests/test_unicode.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_variables.py' -> `./weasyprint/tests/test_variables.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/testing_utils.py' -> `./weasyprint/tests/testing_utils.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/__init__.py' -> `./weasyprint/tests/test_layout/__init__.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/test_block.py' -> `./weasyprint/tests/test_layout/test_block.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/test_column.py' -> `./weasyprint/tests/test_layout/test_column.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/test_flex.py' -> `./weasyprint/tests/test_layout/test_flex.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/test_image.py' -> `./weasyprint/tests/test_layout/test_image.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/test_inline.py' -> `./weasyprint/tests/test_layout/test_inline.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/test_inline_block.py' -> `./weasyprint/tests/test_layout/test_inline_block.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/test_list.py' -> `./weasyprint/tests/test_layout/test_list.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/test_page.py' -> `./weasyprint/tests/test_layout/test_page.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/test_position.py' -> `./weasyprint/tests/test_layout/test_position.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/test_shrink_to_fit.py' -> `./weasyprint/tests/test_layout/test_shrink_to_fit.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_layout/test_table.py' -> `./weasyprint/tests/test_layout/test_table.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/__init__.py' -> `./weasyprint/tests/test_draw/__init__.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_background.py' -> `./weasyprint/tests/test_draw/test_background.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_before_after.py' -> `./weasyprint/tests/test_draw/test_before_after.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_box.py' -> `./weasyprint/tests/test_draw/test_box.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_column.py' -> `./weasyprint/tests/test_draw/test_column.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_current_color.py' -> `./weasyprint/tests/test_draw/test_current_color.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_float.py' -> `./weasyprint/tests/test_draw/test_float.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_gradient.py' -> `./weasyprint/tests/test_draw/test_gradient.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_image.py' -> `./weasyprint/tests/test_draw/test_image.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_list.py' -> `./weasyprint/tests/test_draw/test_list.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_opacity.py' -> `./weasyprint/tests/test_draw/test_opacity.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_overflow.py' -> `./weasyprint/tests/test_draw/test_overflow.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_table.py' -> `./weasyprint/tests/test_draw/test_table.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_text.py' -> `./weasyprint/tests/test_draw/test_text.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_transform.py' -> `./weasyprint/tests/test_draw/test_transform.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/test_draw/test_visibility.py' -> `./weasyprint/tests/test_draw/test_visibility.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/AHEM____.TTF' -> `./weasyprint/tests/resources/AHEM____.TTF' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/acid2-reference.html' -> `./weasyprint/tests/resources/acid2-reference.html' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/acid2-test.html' -> `./weasyprint/tests/resources/acid2-test.html' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/blue.jpg' -> `./weasyprint/tests/resources/blue.jpg' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/doc1.html' -> `./weasyprint/tests/resources/doc1.html' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/doc1_UTF-16BE.html' -> `./weasyprint/tests/resources/doc1_UTF-16BE.html' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/icon.png' -> `./weasyprint/tests/resources/icon.png' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/latin1-test.css' -> `./weasyprint/tests/resources/latin1-test.css' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/logo_small.png' -> `./weasyprint/tests/resources/logo_small.png' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/mini_ua.css' -> `./weasyprint/tests/resources/mini_ua.css' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/pattern.gif' -> `./weasyprint/tests/resources/pattern.gif' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/pattern.palette.png' -> `./weasyprint/tests/resources/pattern.palette.png' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/pattern.png' -> `./weasyprint/tests/resources/pattern.png' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/pattern.svg' -> `./weasyprint/tests/resources/pattern.svg' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/sheet2.css' -> `./weasyprint/tests/resources/sheet2.css' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/user.css' -> `./weasyprint/tests/resources/user.css' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/utf8-test.css' -> `./weasyprint/tests/resources/utf8-test.css' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/weasyprint.otf' -> `./weasyprint/tests/resources/weasyprint.otf' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/really-a-png.svg' -> `./weasyprint/tests/resources/really-a-png.svg' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/really-a-svg.png' -> `./weasyprint/tests/resources/really-a-svg.png' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/tests/resources/sub_directory/sheet1.css' -> `./weasyprint/tests/resources/sub_directory/sheet1.css' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/__init__.py' -> `./weasyprint/layout/__init__.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/absolute.py' -> `./weasyprint/layout/absolute.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/backgrounds.py' -> `./weasyprint/layout/backgrounds.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/blocks.py' -> `./weasyprint/layout/blocks.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/columns.py' -> `./weasyprint/layout/columns.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/flex.py' -> `./weasyprint/layout/flex.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/float.py' -> `./weasyprint/layout/float.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/inlines.py' -> `./weasyprint/layout/inlines.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/min_max.py' -> `./weasyprint/layout/min_max.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/pages.py' -> `./weasyprint/layout/pages.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/percentages.py' -> `./weasyprint/layout/percentages.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/preferred.py' -> `./weasyprint/layout/preferred.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/replaced.py' -> `./weasyprint/layout/replaced.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/layout/tables.py' -> `./weasyprint/layout/tables.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/formatting_structure/boxes.py' -> `./weasyprint/formatting_structure/boxes.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/formatting_structure/build.py' -> `./weasyprint/formatting_structure/build.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/__init__.py' -> `./weasyprint/css/__init__.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/computed_values.py' -> `./weasyprint/css/computed_values.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/counters.py' -> `./weasyprint/css/counters.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/html5_ph.css' -> `./weasyprint/css/html5_ph.css' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/html5_ua.css' -> `./weasyprint/css/html5_ua.css' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/media_queries.py' -> `./weasyprint/css/media_queries.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/properties.py' -> `./weasyprint/css/properties.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/targets.py' -> `./weasyprint/css/targets.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/tests_ua.css' -> `./weasyprint/css/tests_ua.css' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/utils.py' -> `./weasyprint/css/utils.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/validation/__init__.py' -> `./weasyprint/css/validation/__init__.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/validation/descriptors.py' -> `./weasyprint/css/validation/descriptors.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/validation/expanders.py' -> `./weasyprint/css/validation/expanders.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/weasyprint/css/validation/properties.py' -> `./weasyprint/css/validation/properties.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/api.rst' -> `./docs/api.rst' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/changelog.rst' -> `./docs/changelog.rst' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/conf.py' -> `./docs/conf.py' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/features.rst' -> `./docs/features.rst' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/hacking.rst' -> `./docs/hacking.rst' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/index.rst' -> `./docs/index.rst' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/install.rst' -> `./docs/install.rst' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/tips-tricks.rst' -> `./docs/tips-tricks.rst' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/tutorial.rst' -> `./docs/tutorial.rst' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/weasyprint-navigator.png' -> `./docs/weasyprint-navigator.png' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/_static/box_model.png' -> `./docs/_static/box_model.png' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/_static/custom.css' -> `./docs/_static/custom.css' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/_static/icon.ico' -> `./docs/_static/icon.ico' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/docs/_static/logo.svg' -> `./docs/_static/logo.svg' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/.github/FUNDING.yml' -> `./.github/FUNDING.yml' | |
| `/gnu/store/sc1pvzi68v27j20k0qvrrqvw5maqhggl-weasyprint-52.1-checkout/.github/workflows/tests.yml' -> `./.github/workflows/tests.yml' | |
| phase `unpack' succeeded after 0.0 seconds | |
| starting phase `disable-linters' | |
| phase `disable-linters' succeeded after 0.0 seconds | |
| starting phase `patch-library-paths' | |
| phase `patch-library-paths' succeeded after 0.0 seconds | |
| starting phase `ensure-no-mtimes-pre-1980' | |
| phase `ensure-no-mtimes-pre-1980' succeeded after 0.0 seconds | |
| starting phase `enable-bytecode-determinism' | |
| phase `enable-bytecode-determinism' succeeded after 0.0 seconds | |
| starting phase `patch-usr-bin-file' | |
| phase `patch-usr-bin-file' succeeded after 0.0 seconds | |
| starting phase `patch-source-shebangs' | |
| patch-shebang: ./setup.py: changing `/usr/bin/env python' to `/gnu/store/wc4xh9wj49rlbyivxi4lsws6whhzx4ab-python-wrapper-3.8.2/bin/python' | |
| phase `patch-source-shebangs' succeeded after 0.0 seconds | |
| starting phase `patch-generated-file-shebangs' | |
| phase `patch-generated-file-shebangs' succeeded after 0.0 seconds | |
| starting phase `build' | |
| running "python setup.py" with command "build" and parameters () | |
| running build | |
| running build_py | |
| creating build | |
| creating build/lib | |
| creating build/lib/weasyprint | |
| copying weasyprint/__init__.py -> build/lib/weasyprint | |
| copying weasyprint/__main__.py -> build/lib/weasyprint | |
| copying weasyprint/document.py -> build/lib/weasyprint | |
| copying weasyprint/draw.py -> build/lib/weasyprint | |
| copying weasyprint/html.py -> build/lib/weasyprint | |
| copying weasyprint/images.py -> build/lib/weasyprint | |
| copying weasyprint/logger.py -> build/lib/weasyprint | |
| copying weasyprint/pdf.py -> build/lib/weasyprint | |
| copying weasyprint/stacking.py -> build/lib/weasyprint | |
| copying weasyprint/urls.py -> build/lib/weasyprint | |
| copying weasyprint/fonts.py -> build/lib/weasyprint | |
| copying weasyprint/text.py -> build/lib/weasyprint | |
| creating build/lib/weasyprint/css | |
| copying weasyprint/css/__init__.py -> build/lib/weasyprint/css | |
| copying weasyprint/css/computed_values.py -> build/lib/weasyprint/css | |
| copying weasyprint/css/counters.py -> build/lib/weasyprint/css | |
| copying weasyprint/css/media_queries.py -> build/lib/weasyprint/css | |
| copying weasyprint/css/properties.py -> build/lib/weasyprint/css | |
| copying weasyprint/css/targets.py -> build/lib/weasyprint/css | |
| copying weasyprint/css/utils.py -> build/lib/weasyprint/css | |
| creating build/lib/weasyprint/css/validation | |
| copying weasyprint/css/validation/__init__.py -> build/lib/weasyprint/css/validation | |
| copying weasyprint/css/validation/descriptors.py -> build/lib/weasyprint/css/validation | |
| copying weasyprint/css/validation/expanders.py -> build/lib/weasyprint/css/validation | |
| copying weasyprint/css/validation/properties.py -> build/lib/weasyprint/css/validation | |
| package init file 'weasyprint/formatting_structure/__init__.py' not found (or not a regular file) | |
| creating build/lib/weasyprint/formatting_structure | |
| copying weasyprint/formatting_structure/boxes.py -> build/lib/weasyprint/formatting_structure | |
| copying weasyprint/formatting_structure/build.py -> build/lib/weasyprint/formatting_structure | |
| creating build/lib/weasyprint/layout | |
| copying weasyprint/layout/__init__.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/absolute.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/backgrounds.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/blocks.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/columns.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/flex.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/float.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/inlines.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/min_max.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/pages.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/percentages.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/preferred.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/replaced.py -> build/lib/weasyprint/layout | |
| copying weasyprint/layout/tables.py -> build/lib/weasyprint/layout | |
| creating build/lib/weasyprint/tests | |
| copying weasyprint/tests/__init__.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_acid2.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_api.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_boxes.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_counters.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_css.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_css_descriptors.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_css_validation.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_float.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_fonts.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_pdf.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_presentational_hints.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_stacking.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_target.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_text.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_tools.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_unicode.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/test_variables.py -> build/lib/weasyprint/tests | |
| copying weasyprint/tests/testing_utils.py -> build/lib/weasyprint/tests | |
| creating build/lib/weasyprint/tools | |
| copying weasyprint/tools/navigator.py -> build/lib/weasyprint/tools | |
| copying weasyprint/tools/renderer.py -> build/lib/weasyprint/tools | |
| copying weasyprint/tools/__init__.py -> build/lib/weasyprint/tools | |
| copying weasyprint/VERSION -> build/lib/weasyprint | |
| copying weasyprint/css/html5_ph.css -> build/lib/weasyprint/css | |
| copying weasyprint/css/html5_ua.css -> build/lib/weasyprint/css | |
| copying weasyprint/css/tests_ua.css -> build/lib/weasyprint/css | |
| creating build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/AHEM____.TTF -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/acid2-reference.html -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/acid2-test.html -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/blue.jpg -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/doc1.html -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/doc1_UTF-16BE.html -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/icon.png -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/latin1-test.css -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/logo_small.png -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/mini_ua.css -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/pattern.gif -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/pattern.palette.png -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/pattern.png -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/pattern.svg -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/sheet2.css -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/user.css -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/utf8-test.css -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/weasyprint.otf -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/really-a-png.svg -> build/lib/weasyprint/tests/resources | |
| copying weasyprint/tests/resources/really-a-svg.png -> build/lib/weasyprint/tests/resources | |
| creating build/lib/weasyprint/tests/resources/sub_directory | |
| copying weasyprint/tests/resources/sub_directory/sheet1.css -> build/lib/weasyprint/tests/resources/sub_directory | |
| phase `build' succeeded after 0.2 seconds | |
| starting phase `install' | |
| running "python setup.py" with command "install" and parameters ("--prefix=/gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1" "--single-version-externally-managed" "--root=/") | |
| running install | |
| running build | |
| running build_py | |
| package init file 'weasyprint/formatting_structure/__init__.py' not found (or not a regular file) | |
| running install_lib | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1 | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8 | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/__init__.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/__main__.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/document.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/draw.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/html.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/images.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/logger.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/pdf.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/stacking.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/urls.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/fonts.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| copying build/lib/weasyprint/text.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css | |
| copying build/lib/weasyprint/css/__init__.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css | |
| copying build/lib/weasyprint/css/computed_values.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css | |
| copying build/lib/weasyprint/css/counters.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css | |
| copying build/lib/weasyprint/css/media_queries.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css | |
| copying build/lib/weasyprint/css/properties.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css | |
| copying build/lib/weasyprint/css/targets.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css | |
| copying build/lib/weasyprint/css/utils.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/validation | |
| copying build/lib/weasyprint/css/validation/__init__.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/validation | |
| copying build/lib/weasyprint/css/validation/descriptors.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/validation | |
| copying build/lib/weasyprint/css/validation/expanders.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/validation | |
| copying build/lib/weasyprint/css/validation/properties.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/validation | |
| copying build/lib/weasyprint/css/html5_ph.css -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css | |
| copying build/lib/weasyprint/css/html5_ua.css -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css | |
| copying build/lib/weasyprint/css/tests_ua.css -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/formatting_structure | |
| copying build/lib/weasyprint/formatting_structure/boxes.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/formatting_structure | |
| copying build/lib/weasyprint/formatting_structure/build.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/formatting_structure | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/__init__.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/absolute.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/backgrounds.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/blocks.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/columns.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/flex.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/float.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/inlines.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/min_max.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/pages.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/percentages.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/preferred.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/replaced.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| copying build/lib/weasyprint/layout/tables.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/__init__.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_acid2.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_api.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_boxes.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_counters.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_css.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_css_descriptors.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_css_validation.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_float.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_fonts.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_pdf.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_presentational_hints.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_stacking.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_target.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_text.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_tools.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_unicode.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/test_variables.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| copying build/lib/weasyprint/tests/testing_utils.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/AHEM____.TTF -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/acid2-reference.html -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/acid2-test.html -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/blue.jpg -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/doc1.html -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/doc1_UTF-16BE.html -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/icon.png -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/latin1-test.css -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/logo_small.png -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/mini_ua.css -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/pattern.gif -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/pattern.palette.png -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/pattern.png -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/pattern.svg -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/sheet2.css -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/user.css -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/utf8-test.css -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/weasyprint.otf -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/really-a-png.svg -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| copying build/lib/weasyprint/tests/resources/really-a-svg.png -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources/sub_directory | |
| copying build/lib/weasyprint/tests/resources/sub_directory/sheet1.css -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/resources/sub_directory | |
| creating /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tools | |
| copying build/lib/weasyprint/tools/navigator.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tools | |
| copying build/lib/weasyprint/tools/renderer.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tools | |
| copying build/lib/weasyprint/tools/__init__.py -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tools | |
| copying build/lib/weasyprint/VERSION -> /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/__init__.py to __init__.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/__main__.py to __main__.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/document.py to document.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/draw.py to draw.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/html.py to html.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/images.py to images.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/logger.py to logger.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/pdf.py to pdf.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/stacking.py to stacking.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/urls.py to urls.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/fonts.py to fonts.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/text.py to text.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/__init__.py to __init__.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/computed_values.py to computed_values.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/counters.py to counters.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/media_queries.py to media_queries.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/properties.py to properties.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/targets.py to targets.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/utils.py to utils.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/validation/__init__.py to __init__.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/validation/descriptors.py to descriptors.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/validation/expanders.py to expanders.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/css/validation/properties.py to properties.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/formatting_structure/boxes.py to boxes.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/formatting_structure/build.py to build.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/__init__.py to __init__.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/absolute.py to absolute.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/backgrounds.py to backgrounds.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/blocks.py to blocks.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/columns.py to columns.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/flex.py to flex.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/float.py to float.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/inlines.py to inlines.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/min_max.py to min_max.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/pages.py to pages.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/percentages.py to percentages.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/preferred.py to preferred.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/replaced.py to replaced.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/layout/tables.py to tables.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/__init__.py to __init__.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_acid2.py to test_acid2.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_api.py to test_api.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_boxes.py to test_boxes.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_counters.py to test_counters.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_css.py to test_css.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_css_descriptors.py to test_css_descriptors.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_css_validation.py to test_css_validation.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_float.py to test_float.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_fonts.py to test_fonts.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_pdf.py to test_pdf.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_presentational_hints.py to test_presentational_hints.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_stacking.py to test_stacking.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_target.py to test_target.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_text.py to test_text.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_tools.py to test_tools.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_unicode.py to test_unicode.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/test_variables.py to test_variables.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tests/testing_utils.py to testing_utils.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tools/navigator.py to navigator.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tools/renderer.py to renderer.cpython-38.pyc | |
| byte-compiling /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/weasyprint/tools/__init__.py to __init__.cpython-38.pyc | |
| running install_egg_info | |
| running egg_info | |
| creating WeasyPrint.egg-info | |
| writing WeasyPrint.egg-info/PKG-INFO | |
| writing dependency_links to WeasyPrint.egg-info/dependency_links.txt | |
| writing entry points to WeasyPrint.egg-info/entry_points.txt | |
| writing requirements to WeasyPrint.egg-info/requires.txt | |
| writing top-level names to WeasyPrint.egg-info/top_level.txt | |
| writing manifest file 'WeasyPrint.egg-info/SOURCES.txt' | |
| reading manifest file 'WeasyPrint.egg-info/SOURCES.txt' | |
| writing manifest file 'WeasyPrint.egg-info/SOURCES.txt' | |
| Copying WeasyPrint.egg-info to /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/lib/python3.8/site-packages/WeasyPrint-52.1-py3.8.egg-info | |
| running install_scripts | |
| Installing weasyprint script to /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/bin | |
| phase `install' succeeded after 0.3 seconds | |
| starting phase `wrap' | |
| find-files: /gnu/store/i8qlgyrbicv11kpi5zsdmwb9pq09qqky-weasyprint-52.1/sbin: No such file or directory | |
| phase `wrap' succeeded after 0.0 seconds | |
| starting phase `check' | |
| running "python setup.py" with command "test" and parameters () | |
| running pytest | |
| running egg_info | |
| writing WeasyPrint.egg-info/PKG-INFO | |
| writing dependency_links to WeasyPrint.egg-info/dependency_links.txt | |
| writing entry points to WeasyPrint.egg-info/entry_points.txt | |
| writing requirements to WeasyPrint.egg-info/requires.txt | |
| writing top-level names to WeasyPrint.egg-info/top_level.txt | |
| package init file 'weasyprint/formatting_structure/__init__.py' not found (or not a regular file) | |
| reading manifest file 'WeasyPrint.egg-info/SOURCES.txt' | |
| writing manifest file 'WeasyPrint.egg-info/SOURCES.txt' | |
| running build_ext | |
| ============================= test session starts ============================== | |
| platform linux -- Python 3.8.2, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 | |
| rootdir: /tmp/guix-build-weasyprint-52.1.drv-0/source, inifile: setup.cfg | |
| plugins: cov-2.8.1 | |
| collected 1307 items | |
| weasyprint/tests/test_acid2.py F [ 0%] | |
| weasyprint/tests/test_api.py ................... [ 1%] | |
| weasyprint/tests/test_boxes.py ......................................... [ 4%] | |
| ................ [ 5%] | |
| weasyprint/tests/test_counters.py ............................. [ 8%] | |
| weasyprint/tests/test_css.py ........................................... [ 11%] | |
| ......................... [ 13%] | |
| weasyprint/tests/test_css_descriptors.py ............... [ 14%] | |
| weasyprint/tests/test_css_validation.py ................................ [ 16%] | |
| ........................................................................ [ 22%] | |
| .................................................... [ 26%] | |
| weasyprint/tests/test_float.py .........................x [ 28%] | |
| weasyprint/tests/test_fonts.py ..... [ 28%] | |
| weasyprint/tests/test_pdf.py .................................. [ 31%] | |
| weasyprint/tests/test_presentational_hints.py ......... [ 32%] | |
| weasyprint/tests/test_stacking.py ........ [ 32%] | |
| weasyprint/tests/test_target.py ..... [ 33%] | |
| weasyprint/tests/test_text.py F.F....................................... [ 36%] | |
| .............................. [ 38%] | |
| weasyprint/tests/test_tools.py .. [ 38%] | |
| weasyprint/tests/test_unicode.py . [ 38%] | |
| weasyprint/tests/test_variables.py ..................................... [ 41%] | |
| ........................................................................ [ 47%] | |
| ................................................ [ 50%] | |
| weasyprint/tests/test_draw/test_background.py ...FFFFFFFFFFFFFFFFFFFFFF. [ 52%] | |
| .................. [ 54%] | |
| weasyprint/tests/test_draw/test_before_after.py FF. [ 54%] | |
| weasyprint/tests/test_draw/test_box.py ..... [ 54%] | |
| weasyprint/tests/test_draw/test_column.py .. [ 54%] | |
| weasyprint/tests/test_draw/test_current_color.py .... [ 55%] | |
| weasyprint/tests/test_draw/test_float.py ............xx [ 56%] | |
| weasyprint/tests/test_draw/test_gradient.py ........... [ 57%] | |
| weasyprint/tests/test_draw/test_image.py ................... [ 58%] | |
| weasyprint/tests/test_draw/test_list.py ... [ 58%] | |
| weasyprint/tests/test_draw/test_opacity.py ... [ 59%] | |
| weasyprint/tests/test_draw/test_overflow.py ........ [ 59%] | |
| weasyprint/tests/test_draw/test_table.py .....................x [ 61%] | |
| weasyprint/tests/test_draw/test_text.py ... [ 61%] | |
| weasyprint/tests/test_draw/test_transform.py ............. [ 62%] | |
| weasyprint/tests/test_draw/test_visibility.py F.F [ 62%] | |
| weasyprint/tests/test_layout/test_block.py ............................. [ 65%] | |
| ................................x.F [ 67%] | |
| weasyprint/tests/test_layout/test_column.py ...................... [ 69%] | |
| weasyprint/tests/test_layout/test_flex.py .............x............ [ 71%] | |
| weasyprint/tests/test_layout/test_image.py .................... [ 72%] | |
| weasyprint/tests/test_layout/test_inline.py .xF..........x....FF........ [ 75%] | |
| .................... [ 76%] | |
| weasyprint/tests/test_layout/test_inline_block.py F. [ 76%] | |
| weasyprint/tests/test_layout/test_list.py .......x. [ 77%] | |
| weasyprint/tests/test_layout/test_page.py .............................. [ 79%] | |
| ..x.................F................................F.FFF. [ 84%] | |
| weasyprint/tests/test_layout/test_position.py ............. [ 85%] | |
| weasyprint/tests/test_layout/test_shrink_to_fit.py ..................... [ 86%] | |
| ................................................................... [ 91%] | |
| weasyprint/tests/test_layout/test_table.py ............................. [ 94%] | |
| ......................FF...x......F..................................... [ 99%] | |
| .... [100%] | |
| =================================== FAILURES =================================== | |
| __________________________________ test_acid2 __________________________________ | |
| @assert_no_logs | |
| @requires('cairo', (1, 12, 0)) | |
| def test_acid2(): | |
| def render(filename): | |
| return HTML(resource_filename(filename)).render(enable_hinting=True) | |
| with capture_logs(): | |
| # This is a copy of http://www.webstandards.org/files/acid2/test.html | |
| document = render('acid2-test.html') | |
| intro_page, test_page = document.pages | |
| # Ignore the intro page: it is not in the reference | |
| test_image, width, height = document.copy( | |
| [test_page]).write_image_surface() | |
| # This is a copy of http://www.webstandards.org/files/acid2/reference.html | |
| ref_image, ref_width, ref_height = render( | |
| 'acid2-reference.html').write_image_surface() | |
| assert (width, height) == (ref_width, ref_height) | |
| > assert_pixels_equal( | |
| 'acid2', width, height, image_to_pixels(test_image, width, height), | |
| image_to_pixels(ref_image, width, height), tolerance=2) | |
| weasyprint/tests/test_acid2.py:34: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'acid2', width = 794, height = 1123 | |
| raw = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
| expected_raw = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
| tolerance = 2 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (124, 160) in acid2: expected rgba(191, 127, 127, 255), got rgba(128, 0, 0, 255) | |
| weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - /tmp/guix-build-weasyprint-52.1.drv-0/source/weasyprint/tests/resources/acid2-test.html | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| WARNING weasyprint:__init__.py:824 Invalid or unsupported selector '[class=second two] ', (, 'expected ], got ident') | |
| WARNING weasyprint:__init__.py:83 Ignored `error: \}` at 90:74, unknown property. | |
| WARNING weasyprint:__init__.py:83 Ignored `m | |
| rgin: 2em` at 93:14, unknown property. | |
| WARNING weasyprint:__init__.py:824 Invalid or unsupported selector '; | |
| .parser ', (, 'expected a compound selector, got literal') | |
| WARNING weasyprint:__init__.py:83 Ignored `width: 200` at 95:14, invalid value. | |
| WARNING weasyprint:__init__.py:83 Ignored `border: 5em solid red ! error` at 96:14, invalid value. | |
| WARNING weasyprint:__init__.py:83 Ignored `background: red pink` at 97:14, invalid value. | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - data:text/css,.picture%20%7B%20background%3A%20none%3B%20%7D | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| ERROR weasyprint:images.py:242 Failed to load image at "file:///tmp/guix-build-weasyprint-52.1.drv-0/source/weasyprint/tests/resources/404" (URLError: ) | |
| ERROR weasyprint:images.py:242 Failed to load image at "data:application/x-unknown,ERROR" (Pixbuf error: Unrecognized image file format) | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 2 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - /tmp/guix-build-weasyprint-52.1.drv-0/source/weasyprint/tests/resources/acid2-reference.html | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| ______________________________ test_line_content _______________________________ | |
| @assert_no_logs | |
| def test_line_content(): | |
| for width, remaining in [(100, 'text for test'), | |
| (45, 'is a text for test')]: | |
| text = 'This is a text for test' | |
| _, length, resume_at, _, _, _ = make_text( | |
| text, width, font_family=SANS_FONTS.split(','), font_size=19) | |
| > assert text[resume_at:] == remaining | |
| E AssertionError: assert 'a text for test' == 'text for test' | |
| E - a text for test | |
| E ? -- | |
| E + text for test | |
| ../../../source/weasyprint/tests/test_text.py:34: AssertionError | |
| ______________________________ test_line_breaking ______________________________ | |
| @assert_no_logs | |
| def test_line_breaking(): | |
| string = 'Thïs is a text for test' | |
| # These two tests do not really rely on installed fonts | |
| _, _, resume_at, _, _, _ = make_text(string, 90, font_size=1) | |
| assert resume_at is None | |
| _, _, resume_at, _, _, _ = make_text(string, 90, font_size=100) | |
| assert string.encode('utf-8')[resume_at:].decode('utf-8') == ( | |
| 'is a text for test') | |
| _, _, resume_at, _, _, _ = make_text( | |
| string, 100, font_family=SANS_FONTS.split(','), font_size=19) | |
| > assert string.encode('utf-8')[resume_at:].decode('utf-8') == ( | |
| 'text for test') | |
| E AssertionError: assert 'a text for test' == 'text for test' | |
| E - a text for test | |
| E ? -- | |
| E + text for test | |
| ../../../source/weasyprint/tests/test_text.py:59: AssertionError | |
| _ test_background_image[repeat-url(pattern.png)-\n ______________\n ______________\n __rBBBrBBBrB__\n __BBBBBBBBBB__\n __BBBBBBBBBB__\n __BBBBBBBBBB__\n __rBBBrBBBrB__\n __BBBBBBBBBB__\n __BBBBBBBBBB__\n __BBBBBBBBBB__\n __rBBBrBBBrB__\n __BBBBBBBBBB__\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'repeat', css = 'url(pattern.png)' | |
| pixels = '\n ______________\n ______________\n __rBBBrBBBrB__\n __BBBBBBBBBB__\n __BBBBBBBBB... __BBBBBBBBBB__\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_repeat', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_repeat: expected rgba(255, 0, 0, 255), got rgba(115, 0, 0, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[repeat_x-url(pattern.png) repeat-x-\n ______________\n ______________\n __rBBBrBBBrB__\n __BBBBBBBBBB__\n __BBBBBBBBBB__\n __BBBBBBBBBB__\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'repeat_x', css = 'url(pattern.png) repeat-x' | |
| pixels = '\n ______________\n ______________\n __rBBBrBBBrB__\n __BBBBBBBBBB__\n __BBBBBBBBB... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_repeat_x', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_repeat_x: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[repeat_y-url(pattern.png) repeat-y-\n ______________\n ______________\n __rBBB________\n __BBBB________\n __BBBB________\n __BBBB________\n __rBBB________\n __BBBB________\n __BBBB________\n __BBBB________\n __rBBB________\n __BBBB________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'repeat_y', css = 'url(pattern.png) repeat-y' | |
| pixels = '\n ______________\n ______________\n __rBBB________\n __BBBB________\n __BBBB_____... __BBBB________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_repeat_y', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_repeat_y: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[left_top-url(pattern.png) no-repeat 0 0%-\n ______________\n ______________\n __rBBB________\n __BBBB________\n __BBBB________\n __BBBB________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'left_top', css = 'url(pattern.png) no-repeat 0 0%' | |
| pixels = '\n ______________\n ______________\n __rBBB________\n __BBBB________\n __BBBB_____... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_left_top', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_left_top: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[center_top-url(pattern.png) no-repeat 50% 0px-\n ______________\n ______________\n _____rBBB_____\n _____BBBB_____\n _____BBBB_____\n _____BBBB_____\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'center_top', css = 'url(pattern.png) no-repeat 50% 0px' | |
| pixels = '\n ______________\n ______________\n _____rBBB_____\n _____BBBB_____\n _____BBBB__... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_center_top', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_center_top: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[right_top-url(pattern.png) no-repeat 6px top-\n ______________\n ______________\n ________rBBB__\n ________BBBB__\n ________BBBB__\n ________BBBB__\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'right_top', css = 'url(pattern.png) no-repeat 6px top' | |
| pixels = '\n ______________\n ______________\n ________rBBB__\n ________BBBB__\n ________BBB... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_right_top', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_right_top: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[bottom_6_right_0-url(pattern.png) no-repeat bottom 6px right 0-\n ______________\n ______________\n ________rBBB__\n ________BBBB__\n ________BBBB__\n ________BBBB__\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'bottom_6_right_0', css = 'url(pattern.png) no-repeat bottom 6px right 0' | |
| pixels = '\n ______________\n ______________\n ________rBBB__\n ________BBBB__\n ________BBB... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_bottom_6_right_0', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_bottom_6_right_0: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[left_center-url(pattern.png) no-repeat left center-\n ______________\n ______________\n ______________\n ______________\n ______________\n __rBBB________\n __BBBB________\n __BBBB________\n __BBBB________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'left_center', css = 'url(pattern.png) no-repeat left center' | |
| pixels = '\n ______________\n ______________\n ______________\n ______________\n ___________... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_left_center', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_left_center: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[center_left-url(pattern.png) no-repeat center left-\n ______________\n ______________\n ______________\n ______________\n ______________\n __rBBB________\n __BBBB________\n __BBBB________\n __BBBB________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'center_left', css = 'url(pattern.png) no-repeat center left' | |
| pixels = '\n ______________\n ______________\n ______________\n ______________\n ___________... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_center_left', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_center_left: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[center_center-url(pattern.png) no-repeat 3px 3px-\n ______________\n ______________\n ______________\n ______________\n ______________\n _____rBBB_____\n _____BBBB_____\n _____BBBB_____\n _____BBBB_____\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'center_center', css = 'url(pattern.png) no-repeat 3px 3px' | |
| pixels = '\n ______________\n ______________\n ______________\n ______________\n ___________... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_center_center', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_center_center: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[right_center-url(pattern.png) no-repeat 100% 50%-\n ______________\n ______________\n ______________\n ______________\n ______________\n ________rBBB__\n ________BBBB__\n ________BBBB__\n ________BBBB__\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'right_center', css = 'url(pattern.png) no-repeat 100% 50%' | |
| pixels = '\n ______________\n ______________\n ______________\n ______________\n ___________... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_right_center', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_right_center: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[left_bottom-url(pattern.png) no-repeat 0% bottom-\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n __rBBB________\n __BBBB________\n __BBBB________\n __BBBB________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'left_bottom', css = 'url(pattern.png) no-repeat 0% bottom' | |
| pixels = '\n ______________\n ______________\n ______________\n ______________\n ___________... __BBBB________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_left_bottom', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_left_bottom: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[center_bottom-url(pattern.png) no-repeat center 6px-\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n _____rBBB_____\n _____BBBB_____\n _____BBBB_____\n _____BBBB_____\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'center_bottom', css = 'url(pattern.png) no-repeat center 6px' | |
| pixels = '\n ______________\n ______________\n ______________\n ______________\n ___________... _____BBBB_____\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_center_bottom', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_center_bottom: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[bottom_center-url(pattern.png) no-repeat bottom center-\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n _____rBBB_____\n _____BBBB_____\n _____BBBB_____\n _____BBBB_____\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'bottom_center', css = 'url(pattern.png) no-repeat bottom center' | |
| pixels = '\n ______________\n ______________\n ______________\n ______________\n ___________... _____BBBB_____\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_bottom_center', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_bottom_center: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[right_bottom-url(pattern.png) no-repeat 6px 100%-\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ________rBBB__\n ________BBBB__\n ________BBBB__\n ________BBBB__\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'right_bottom', css = 'url(pattern.png) no-repeat 6px 100%' | |
| pixels = '\n ______________\n ______________\n ______________\n ______________\n ___________... ________BBBB__\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_right_bottom', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_right_bottom: expected rgba(255, 0, 0, 255), got rgba(115, 0, 0, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[repeat_x_1px_2px-url(pattern.png) repeat-x 1px 2px-\n ______________\n ______________\n ______________\n ______________\n __BrBBBrBBBr__\n __BBBBBBBBBB__\n __BBBBBBBBBB__\n __BBBBBBBBBB__\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'repeat_x_1px_2px', css = 'url(pattern.png) repeat-x 1px 2px' | |
| pixels = '\n ______________\n ______________\n ______________\n ______________\n __BrBBBrBBB... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_repeat_x_1px_2px', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_repeat_x_1px_2px: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[repeat_y_local_2px_1px-url(pattern.png) repeat-y local 2px 1px-\n ______________\n ______________\n ____BBBB______\n ____rBBB______\n ____BBBB______\n ____BBBB______\n ____BBBB______\n ____rBBB______\n ____BBBB______\n ____BBBB______\n ____BBBB______\n ____rBBB______\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'repeat_y_local_2px_1px', css = 'url(pattern.png) repeat-y local 2px 1px' | |
| pixels = '\n ______________\n ______________\n ____BBBB______\n ____rBBB______\n ____BBBB___... ____rBBB______\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_repeat_y_local_2px_1px', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_repeat_y_local_2px_1px: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[fixed-url(pattern.png) no-repeat fixed-\n # The image is actually here:\n #######\n ______________\n ______________\n __BB__________\n __BB__________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'fixed', css = 'url(pattern.png) no-repeat fixed' | |
| pixels = '\n # The image is actually here:\n #######\n ______________\n ______________\n __B... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_fixed', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_fixed: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[fixed_right-url(pattern.png) no-repeat fixed right 3px-\n # x x x x\n ______________\n ______________\n ______________\n __________rB__ #\n __________BB__ #\n __________BB__ #\n __________BB__ #\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'fixed_right', css = 'url(pattern.png) no-repeat fixed right 3px' | |
| pixels = '\n # x x x x\n ______________\n ______________\n ______________\n ... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_fixed_right', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_fixed_right: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[fixed_center_center-url(pattern.png)no-repeat fixed 50%center-\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n _____rBBB_____\n _____BBBB_____\n _____BBBB_____\n _____BBBB_____\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'fixed_center_center', css = 'url(pattern.png)no-repeat fixed 50%center' | |
| pixels = '\n ______________\n ______________\n ______________\n ______________\n ___________... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_fixed_center_center', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_fixed_center_center: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[multi_under-url(pattern.png) no-repeat,\n url(pattern.png) no-repeat 2px 1px-\n ______________\n ______________\n __rBBB________\n __BBBBBB______\n __BBBBBB______\n __BBBBBB______\n ____BBBB______\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'multi_under' | |
| css = 'url(pattern.png) no-repeat,\n url(pattern.png) no-repeat 2px 1px' | |
| pixels = '\n ______________\n ______________\n __rBBB________\n __BBBBBB______\n __BBBBBB___... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_multi_under', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_multi_under: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _ test_background_image[multi_over-url(pattern.png) no-repeat 2px 1px,\n url(pattern.png) no-repeat-\n ______________\n ______________\n __rBBB________\n __BBrBBB______\n __BBBBBB______\n __BBBBBB______\n ____BBBB______\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ______________\n ] _ | |
| name = 'multi_over' | |
| css = 'url(pattern.png) no-repeat 2px 1px,\n url(pattern.png) no-repeat' | |
| pixels = '\n ______________\n ______________\n __rBBB________\n __BBrBBB______\n __BBBBBB___... ______________\n ______________\n ______________\n ______________\n ______________\n ' | |
| @assert_no_logs | |
| @pytest.mark.parametrize('name, css, pixels', ( | |
| ('repeat', 'url(pattern.png)', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x', 'url(pattern.png) repeat-x', ''' | |
| ______________ | |
| ______________ | |
| __rBBBrBBBrB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y', 'url(pattern.png) repeat-y', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __rBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_top', 'url(pattern.png) no-repeat 0 0%', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_top', 'url(pattern.png) no-repeat 50% 0px', ''' | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_top', 'url(pattern.png) no-repeat 6px top', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_6_right_0', 'url(pattern.png) no-repeat bottom 6px right 0', ''' | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_center', 'url(pattern.png) no-repeat left center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_left', 'url(pattern.png) no-repeat center left', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_center', 'url(pattern.png) no-repeat 3px 3px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_center', 'url(pattern.png) no-repeat 100% 50%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('left_bottom', 'url(pattern.png) no-repeat 0% bottom', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| __BBBB________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('center_bottom', 'url(pattern.png) no-repeat center 6px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('bottom_center', 'url(pattern.png) no-repeat bottom center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('right_bottom', 'url(pattern.png) no-repeat 6px 100%', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ________rBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ________BBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_x_1px_2px', 'url(pattern.png) repeat-x 1px 2px', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| __BrBBBrBBBr__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| __BBBBBBBBBB__ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('repeat_y_local_2px_1px', 'url(pattern.png) repeat-y local 2px 1px', ''' | |
| ______________ | |
| ______________ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____BBBB______ | |
| ____rBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed', 'url(pattern.png) no-repeat fixed', ''' | |
| # The image is actually here: | |
| ####### | |
| ______________ | |
| ______________ | |
| __BB__________ | |
| __BB__________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_right', 'url(pattern.png) no-repeat fixed right 3px', ''' | |
| # x x x x | |
| ______________ | |
| ______________ | |
| ______________ | |
| __________rB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| __________BB__ # | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('fixed_center_center', 'url(pattern.png)no-repeat fixed 50%center', ''' | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| _____rBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| _____BBBB_____ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_under', '''url(pattern.png) no-repeat, | |
| url(pattern.png) no-repeat 2px 1px''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| ('multi_over', '''url(pattern.png) no-repeat 2px 1px, | |
| url(pattern.png) no-repeat''', ''' | |
| ______________ | |
| ______________ | |
| __rBBB________ | |
| __BBrBBB______ | |
| __BBBBBB______ | |
| __BBBBBB______ | |
| ____BBBB______ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| ______________ | |
| '''), | |
| )) | |
| def test_background_image(name, css, pixels): | |
| # pattern.png looks like this: | |
| # rBBB | |
| # BBBB | |
| # BBBB | |
| # BBBB | |
| > assert_pixels('background_' + name, 14, 16, pixels, ''' | |
| html { background: #fff } | |
| body { margin: 2px; height: 10px; | |
| background: %s } | |
| p { background: none } | |
| ''' % css) | |
| ../../../source/weasyprint/tests/test_draw/test_background.py:493: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'background_multi_over', width = 14, height = 16 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (11, 9) in background_multi_over: expected rgba(255, 255, 255, 255), got rgba(115, 115, 115, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _____________________________ test_before_after_1 ______________________________ | |
| @assert_no_logs | |
| def test_before_after_1(): | |
| > assert_same_rendering(300, 30, [ | |
| ('pseudo_before', ''' | |
| body { margin: 0; background: #fff } | |
| a[href]:before { content: '[' attr(href) '] ' } | |
| some content | |
| '''), | |
| ('pseudo_before_reference', ''' | |
| body { margin: 0; background: #fff } | |
| [some url] some content | |
| ''') | |
| ], tolerance=10) | |
| ../../../source/weasyprint/tests/test_draw/test_before_after.py:15: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:71: in assert_same_rendering | |
| _doc, pixels = html_to_pixels( | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:125: in html_to_pixels | |
| pixels = document_to_pixels( | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:133: in document_to_pixels | |
| return image_to_pixels(surface, expected_width, expected_height) | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| surface = | |
| width = 300, height = 30 | |
| def image_to_pixels(surface, width, height): | |
| > assert (surface.get_width(), surface.get_height()) == (width, height) | |
| E AssertionError | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:137: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 2 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _____________________________ test_before_after_2 ______________________________ | |
| @assert_no_logs | |
| def test_before_after_2(): | |
| > assert_same_rendering(500, 30, [ | |
| ('pseudo_quotes', ''' | |
| body { margin: 0; background: #fff; quotes: '«' '»' '“' '”' } | |
| q:before { content: open-quote ' '} | |
| q:after { content: ' ' close-quote } | |
| Lorem ipsum dolor sit amet | |
| '''), | |
| ('pseudo_quotes_reference', ''' | |
| body { margin: 0; background: #fff } | |
| q:before, q:after { content: none } | |
| « Lorem ipsum | |
| “ dolor ” | |
| sit amet » | |
| ''') | |
| ], tolerance=10) | |
| ../../../source/weasyprint/tests/test_draw/test_before_after.py:36: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:71: in assert_same_rendering | |
| _doc, pixels = html_to_pixels( | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:125: in html_to_pixels | |
| pixels = document_to_pixels( | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:133: in document_to_pixels | |
| return image_to_pixels(surface, expected_width, expected_height) | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| surface = | |
| width = 500, height = 30 | |
| def image_to_pixels(surface, width, height): | |
| > assert (surface.get_width(), surface.get_height()) == (width, height) | |
| E AssertionError | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:137: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 2 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| ______________________________ test_visibility_1 _______________________________ | |
| @assert_no_logs | |
| def test_visibility_1(): | |
| > assert_pixels('visibility_reference', 12, 7, ''' | |
| ____________ | |
| _rBBB_rBBB__ | |
| _BBBB_BBBB__ | |
| _BBBB_BBBB__ | |
| _BBBB_BBBB__ | |
| ____________ | |
| ____________ | |
| ''', visibility_source % {'extra_css': ''}) | |
| ../../../source/weasyprint/tests/test_draw/test_visibility.py:27: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'visibility_reference', width = 12, height = 7 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (1, 6) in visibility_reference: expected rgba(0, 0, 255, 255), got rgba(255, 255, 255, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| ______________________________ test_visibility_3 _______________________________ | |
| @assert_no_logs | |
| def test_visibility_3(): | |
| > assert_pixels('visibility_mixed', 12, 7, ''' | |
| ____________ | |
| ______rBBB__ | |
| ______BBBB__ | |
| ______BBBB__ | |
| ______BBBB__ | |
| ____________ | |
| ____________ | |
| ''', visibility_source % {'extra_css': '''div { visibility: hidden } | |
| span { visibility: visible } '''}) | |
| ../../../source/weasyprint/tests/test_draw/test_visibility.py:53: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:57: in assert_pixels | |
| assert_pixels_equal( | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| name = 'visibility_mixed', width = 12, height = 7 | |
| raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| expected_raw = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff...ff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' | |
| tolerance = 0 | |
| def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0): | |
| """Take 2 matrices of pixels and assert that they are the same.""" | |
| if raw != expected_raw: # pragma: no cover | |
| for i, (value, expected) in enumerate(zip(raw, expected_raw)): | |
| if abs(value - expected) > tolerance: | |
| write_png(name, raw, width, height) | |
| write_png(name + '.expected', expected_raw, | |
| width, height) | |
| pixel_n = i // 4 | |
| x = pixel_n // width | |
| y = pixel_n % width | |
| i % 4 | |
| pixel = tuple(list(raw[i:i + 4])) | |
| expected_pixel = tuple(list( | |
| expected_raw[i:i + 4])) | |
| > assert 0, ( | |
| 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%s' | |
| % (x, y, name, expected_pixel, pixel)) | |
| E AssertionError: Pixel (1, 6) in visibility_mixed: expected rgba(0, 0, 255, 255), got rgba(255, 255, 255, 255) | |
| ../../../source/weasyprint/tests/test_draw/__init__.py:160: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:document.py:775 Step 6 - Drawing | |
| _______________________ test_box_margin_top_repagination _______________________ | |
| @assert_no_logs | |
| def test_box_margin_top_repagination(): | |
| # Test regression: https://github.com/Kozea/WeasyPrint/issues/943 | |
| > page_1, page_2 = parse(''' | |
| :root { line-height: 1; font-size: 10px } | |
| a::before { content: target-counter(attr(href), page) } | |
| div { margin: 20px 0 0; background: yellow } | |
| 1 | |
| 1 | |
| 2 | |
| 2 | |
| title | |
| ''') | |
| E ValueError: too many values to unpack (expected 2) | |
| ../../../source/weasyprint/tests/test_layout/test_block.py:756: ValueError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 2 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 3 | |
| INFO weasyprint.progress:__init__.py:119 Step 5 - Creating layout - Repagination #1 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:pages.py:803 Step 5 - Creating layout - Page 2 (up-to-date) | |
| INFO weasyprint.progress:pages.py:803 Step 5 - Creating layout - Page 3 (up-to-date) | |
| ____________________________ test_breaking_linebox _____________________________ | |
| @assert_no_logs | |
| def test_breaking_linebox(): | |
| page, = parse(''' | |
| p { font-size: 13px; | |
| width: 300px; | |
| font-family: %(fonts)s; | |
| background-color: #393939; | |
| color: #FFFFFF; | |
| line-height: 1; | |
| text-decoration: underline overline line-through;} | |
| Lorem Ipsum is verysimply | |
| dummytext of the printing and. naaaa naaaa naaaa naaaa | |
| naaaa naaaa naaaa naaaa naaaa | |
| ''' % {'fonts': SANS_FONTS}) | |
| html, = page.children | |
| body, = html.children | |
| paragraph, = body.children | |
| > assert len(list(paragraph.children)) == 3 | |
| E assert 6 == 3 | |
| E + where 6 = len([, , , , , ]) | |
| E + where [, , , , , ] = list((, , , , , )) | |
| E + where (, , , , , ) = .children | |
| ../../../source/weasyprint/tests/test_layout/test_inline.py:63: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| ______________________________ test_linebox_text _______________________________ | |
| @assert_no_logs | |
| def test_linebox_text(): | |
| page, = parse(''' | |
| p { width: 165px; font-family:%(fonts)s;} | |
| Lorem Ipsumis very coool | |
| ''' % {'fonts': SANS_FONTS}) | |
| html, = page.children | |
| body, = html.children | |
| paragraph, = body.children | |
| lines = list(paragraph.children) | |
| > assert len(lines) == 2 | |
| E assert 3 == 2 | |
| E + where 3 = len([, , ]) | |
| ../../../source/weasyprint/tests/test_layout/test_inline.py:447: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| ____________________________ test_linebox_positions ____________________________ | |
| @assert_no_logs | |
| def test_linebox_positions(): | |
| for width, expected_lines in [(165, 2), (1, 5), (0, 5)]: | |
| page = ''' | |
| p { width:%(width)spx; font-family:%(fonts)s; | |
| line-height: 20px } | |
| this is test for Weasyprint | |
| ''' | |
| page, = parse(page % {'fonts': SANS_FONTS, 'width': width}) | |
| html, = page.children | |
| body, = html.children | |
| paragraph, = body.children | |
| lines = list(paragraph.children) | |
| > assert len(lines) == expected_lines | |
| E assert 3 == 2 | |
| E + where 3 = len([, , ]) | |
| ../../../source/weasyprint/tests/test_layout/test_inline.py:470: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| ___________________________ test_inline_block_sizes ____________________________ | |
| @assert_no_logs | |
| def test_inline_block_sizes(): | |
| page, = parse(''' | |
| body { margin: 0 } | |
| div { display: inline-block; } | |
| a | |
| Ipsum dolor sit amet, | |
| consectetur adipiscing elit. | |
| Sed sollicitudin nibh | |
| et turpis molestie tristique. | |
| foo | |
| Supercalifragilisticexpialidocious | |
| ''') | |
| html, = page.children | |
| assert html.element_tag == 'html' | |
| body, = html.children | |
| assert body.element_tag == 'body' | |
| assert body.width == 200 | |
| > line_1, line_2, line_3, line_4 = body.children | |
| E ValueError: too many values to unpack (expected 4) | |
| ../../../source/weasyprint/tests/test_layout/test_inline_block.py:50: ValueError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| ________ test_orphans_widows_avoid[orphans: 2; widows: 2-line_counts0] _________ | |
| style = 'orphans: 2; widows: 2', line_counts = [3] | |
| @assert_no_logs | |
| @pytest.mark.parametrize('style, line_counts', ( | |
| ('orphans: 2; widows: 2', [4, 3]), | |
| ('orphans: 5; widows: 2', [0, 7]), | |
| ('orphans: 2; widows: 4', [3, 4]), | |
| ('orphans: 4; widows: 4', [0, 7]), | |
| ('orphans: 2; widows: 2; page-break-inside: avoid', [0, 7]), | |
| )) | |
| def test_orphans_widows_avoid(style, line_counts): | |
| pages = render_pages(''' | |
| h1 { height: 120px } | |
| p { line-height: 20px; | |
| width: 1px; /* line break at each word */ | |
| %s } | |
| Tasty test | |
| one two three four five six seven | |
| ''' % style) | |
| for i, page in enumerate(pages): | |
| html, = page.children | |
| body, = html.children | |
| body_children = body.children if i else body.children[1:] # skip h1 | |
| count = len(body_children[0].children) if body_children else 0 | |
| > assert line_counts.pop(0) == count | |
| E assert 4 == 3 | |
| E + where 4 = (0) | |
| E + where = [3].pop | |
| ../../../source/weasyprint/tests/test_layout/test_page.py:801: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 2 | |
| _______________________ test_margin_boxes_vertical_align _______________________ | |
| @assert_no_logs | |
| def test_margin_boxes_vertical_align(): | |
| # 3 px -> +-----+ | |
| # | 1 | | |
| # +-----+ | |
| # | |
| # 43 px -> +-----+ | |
| # 53 px -> | 2 | | |
| # +-----+ | |
| # | |
| # 83 px -> +-----+ | |
| # | 3 | | |
| # 103px -> +-----+ | |
| page, = render_pages(''' | |
| ''') | |
| html, top_left, top_center, top_right = page.children | |
| line_1, = top_left.children | |
| line_2, = top_center.children | |
| line_3, = top_right.children | |
| assert line_1.position_y == 3 | |
| > assert line_2.position_y == 43 | |
| E assert 42.75 == 43 | |
| E + where 42.75 = .position_y | |
| ../../../source/weasyprint/tests/test_layout/test_page.py:1212: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| _____________________ test_running_elements[first-texts0] ______________________ | |
| argument = 'first', texts = ('', '2-first', '3-first', '3-last', '5') | |
| @assert_no_logs | |
| @pytest.mark.parametrize('argument, texts', ( | |
| # TODO: start doesn’t work because running elements are removed from the | |
| # original tree, and the current implentation in | |
| # layout.get_running_element_for uses the tree to know if it’s at the | |
| # beginning of the page | |
| # ('start', ('', '2-first', '2-last', '3-last', '5')), | |
| ('first', ('', '2-first', '3-first', '3-last', '5')), | |
| ('last', ('', '2-last', '3-last', '3-last', '5')), | |
| ('first-except', ('', '', '', '3-last', '')), | |
| )) | |
| def test_running_elements(argument, texts): | |
| pages = render_pages(''' | |
| article { break-after: page } | |
| h1 { position: running(title) } | |
| 1 | |
| 2-first | |
| 2-last | |
| 3 | |
| 3-first | |
| 3-last | |
| 5 | |
| ''' % argument) | |
| assert len(pages) == 5 | |
| for page, text in zip(pages, texts): | |
| html, margin = page.children | |
| if margin.children: | |
| h1, = margin.children | |
| > line, = h1.children | |
| E ValueError: too many values to unpack (expected 1) | |
| ../../../source/weasyprint/tests/test_layout/test_page.py:1312: ValueError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 2 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 3 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 4 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 5 | |
| ______________________ test_running_elements[last-texts1] ______________________ | |
| argument = 'last', texts = ('', '2-last', '3-last', '3-last', '5') | |
| @assert_no_logs | |
| @pytest.mark.parametrize('argument, texts', ( | |
| # TODO: start doesn’t work because running elements are removed from the | |
| # original tree, and the current implentation in | |
| # layout.get_running_element_for uses the tree to know if it’s at the | |
| # beginning of the page | |
| # ('start', ('', '2-first', '2-last', '3-last', '5')), | |
| ('first', ('', '2-first', '3-first', '3-last', '5')), | |
| ('last', ('', '2-last', '3-last', '3-last', '5')), | |
| ('first-except', ('', '', '', '3-last', '')), | |
| )) | |
| def test_running_elements(argument, texts): | |
| pages = render_pages(''' | |
| article { break-after: page } | |
| h1 { position: running(title) } | |
| 1 | |
| 2-first | |
| 2-last | |
| 3 | |
| 3-first | |
| 3-last | |
| 5 | |
| ''' % argument) | |
| assert len(pages) == 5 | |
| for page, text in zip(pages, texts): | |
| html, margin = page.children | |
| if margin.children: | |
| h1, = margin.children | |
| > line, = h1.children | |
| E ValueError: too many values to unpack (expected 1) | |
| ../../../source/weasyprint/tests/test_layout/test_page.py:1312: ValueError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 2 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 3 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 4 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 5 | |
| __________________ test_running_elements[first-except-texts2] __________________ | |
| argument = 'first-except', texts = ('', '', '', '3-last', '') | |
| @assert_no_logs | |
| @pytest.mark.parametrize('argument, texts', ( | |
| # TODO: start doesn’t work because running elements are removed from the | |
| # original tree, and the current implentation in | |
| # layout.get_running_element_for uses the tree to know if it’s at the | |
| # beginning of the page | |
| # ('start', ('', '2-first', '2-last', '3-last', '5')), | |
| ('first', ('', '2-first', '3-first', '3-last', '5')), | |
| ('last', ('', '2-last', '3-last', '3-last', '5')), | |
| ('first-except', ('', '', '', '3-last', '')), | |
| )) | |
| def test_running_elements(argument, texts): | |
| pages = render_pages(''' | |
| article { break-after: page } | |
| h1 { position: running(title) } | |
| 1 | |
| 2-first | |
| 2-last | |
| 3 | |
| 3-first | |
| 3-last | |
| 5 | |
| ''' % argument) | |
| assert len(pages) == 5 | |
| for page, text in zip(pages, texts): | |
| html, margin = page.children | |
| if margin.children: | |
| h1, = margin.children | |
| > line, = h1.children | |
| E ValueError: too many values to unpack (expected 1) | |
| ../../../source/weasyprint/tests/test_layout/test_page.py:1312: ValueError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:349 Step 2 - Fetching and parsing CSS - CSS string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 2 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 3 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 4 | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 5 | |
| __________________________ test_layout_table_auto_44 ___________________________ | |
| @assert_no_logs | |
| def test_layout_table_auto_44(): | |
| # Cells widths as percentages on normal and colspan cells | |
| page, = render_pages(''' | |
| a a a a a a a a | |
| a a a a a a a a | |
| a a a a a a a a | |
| a a a a a a a a | |
| a a a a a a a a | |
| ''') | |
| html, = page.children | |
| body, = html.children | |
| div, = body.children | |
| table_wrapper, = div.children | |
| table, = table_wrapper.children | |
| row_group, = table.children | |
| row, = row_group.children | |
| td_1, td_2, td_3, td_4, td_5 = row.children | |
| > assert td_1.width == 10 | |
| E assert 17.0 == 10 | |
| E + where 17.0 = .width | |
| ../../../source/weasyprint/tests/test_layout/test_table.py:1368: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| __________________________ test_layout_table_auto_45 ___________________________ | |
| @assert_no_logs | |
| def test_layout_table_auto_45(): | |
| # Cells widths as percentage on multiple lines | |
| page, = render_pages(''' | |
| a a a a a a a a | |
| a a a a a a a a | |
| a a a a a a a a | |
| a a a a a a a a | |
| a a a a a a a a | |
| a a a a a a a a | |
| a a a a a a a a | |
| a a a a a a a a | |
| ''') | |
| html, = page.children | |
| body, = html.children | |
| div, = body.children | |
| table_wrapper, = div.children | |
| table, = table_wrapper.children | |
| row_group, = table.children | |
| row_1, row_2 = row_group.children | |
| td_11, td_12, td_13, td_14, td_15 = row_1.children | |
| td_21, td_22, td_23 = row_2.children | |
| > assert td_11.width == 10 # 31% - 30% | |
| E assert 17.0 == 10 | |
| E + where 17.0 = .width | |
| ../../../source/weasyprint/tests/test_layout/test_table.py:1408: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| ___________________________ test_table_row_height_1 ____________________________ | |
| @assert_no_logs | |
| def test_table_row_height_1(): | |
| page, = render_pages(''' | |
| X | |
| X | |
| X | |
| X | |
| X | |
| X | |
| X | |
| ''') | |
| html, = page.children | |
| body, = html.children | |
| wrapper, = body.children | |
| table, = wrapper.children | |
| row_group, = table.children | |
| assert wrapper.position_y == 0 | |
| assert table.position_y == 3 # 0 + margin-top | |
| assert table.height == 620 # sum of row heigths + 5*border-spacing | |
| assert wrapper.height == table.height | |
| assert row_group.position_y == 103 # 3 + border-spacing | |
| assert row_group.height == 420 # 620 - 2*border-spacing | |
| > assert [row.height for row in row_group.children] == [ | |
| 80, 30, 0, 10] | |
| E assert [83.0, 30.0, 0, 7.0] == [80, 30, 0, 10] | |
| E At index 0 diff: 83.0 != 80 | |
| E Use -v to get the full diff | |
| ../../../source/weasyprint/tests/test_layout/test_table.py:1775: AssertionError | |
| ------------------------------ Captured log call ------------------------------- | |
| INFO weasyprint.progress:__init__.py:103 Step 1 - Fetching and parsing HTML - HTML string | |
| INFO weasyprint.progress:__init__.py:64 Step 3 - Applying CSS | |
| INFO weasyprint.progress:document.py:380 Step 4 - Creating formatting structure | |
| INFO weasyprint.progress:pages.py:794 Step 5 - Creating layout - Page 1 | |
| ============ 42 failed, 1254 passed, 11 xfailed in 60.38s (0:01:00) ============ | |
| command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1 | |
| builder for `/gnu/store/jidwphw1is0mlphmwaspacl26f0krzqv-weasyprint-52.1.drv' failed with exit code 1 | |
| @ build-failed /gnu/store/jidwphw1is0mlphmwaspacl26f0krzqv-weasyprint-52.1.drv - 1 builder for `/gnu/store/jidwphw1is0mlphmwaspacl26f0krzqv-weasyprint-52.1.drv' failed with exit code 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment