git.iko.soy/typeable/nixpkgs
on master help sign in
python.pkgs.cairocffi: update tests for Cairo 1.15.12

Fixes #41183

commit6db9f4685a310f1ae65e35afacd977d2ed8fb01d authorOrivej Desh <orivej@gmx.fr> dateMon 4 Jun 2018, 02:35 (8 years ago) parent2642545
2 files changed+25
pkgs/development/python-modules/cairocffi/cairocffi-0.8.1-cairo-1.15.12.patch+24 pkgs/development/python-modules/cairocffi/default.nix+1
pkgs/development/python-modules/cairocffi/cairocffi-0.8.1-cairo-1.15.12.patchnew file+24
@@ -0,0 +1,24 @@
1+diff --git a/cairocffi/test_cairo.py b/cairocffi/test_cairo.py
2+index 1588349..5452910 100644
3+--- a/cairocffi/test_cairo.py
4++++ b/cairocffi/test_cairo.py
5+@@ -292,7 +292,8 @@ def test_pdf_surface():
6+ pdf_bytes = file_obj.getvalue()
7+ assert pdf_bytes.startswith(b'%PDF')
8+ assert b'/MediaBox [ 0 0 123 432 ]' in pdf_bytes
9+- assert pdf_bytes.count(b'/Type /Page\n') == 1
10++ assert pdf_bytes.count(b'/Type /Pages') == 1
11++ assert pdf_bytes.count(b'/Type /Page') == 2
12+
13+ file_obj = io.BytesIO()
14+ surface = PDFSurface(file_obj, 1, 1)
15+@@ -306,7 +307,8 @@ def test_pdf_surface():
16+ assert b'/MediaBox [ 0 0 1 1 ]' not in pdf_bytes
17+ assert b'/MediaBox [ 0 0 12 100 ]' in pdf_bytes
18+ assert b'/MediaBox [ 0 0 42 700 ]' in pdf_bytes
19+- assert pdf_bytes.count(b'/Type /Page\n') == 2
20++ assert pdf_bytes.count(b'/Type /Pages') == 1
21++ assert pdf_bytes.count(b'/Type /Page') == 3
22+
23+
24+ def test_svg_surface():
pkgs/development/python-modules/cairocffi/default.nix+1
@@ -47,6 +47,7 @@ buildPythonPackage rec {
4747 gdk_pixbuf = gdk_pixbuf.out;
4848 })
4949 ./fix_test_scaled_font.patch
50+ ./cairocffi-0.8.1-cairo-1.15.12.patch
5051 ];
5152
5253 meta = with lib; {