about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKamil Chmielewski <kamil.chm@gmail.com>2016-09-01 09:14:10 +0200
committerKamil Chmielewski <kamil.chm@gmail.com>2016-09-01 09:14:10 +0200
commit9e18b81dedec6d06f5bdfc80c26f281f1b07a2d1 (patch)
treedb1b44535d0f97b4f507c8b811c7a5d333eaa181
parent78e9bc731b56c53dd2ce3d6e3424c1af9113e277 (diff)
python27Packages.cairocffi: FIX test_scaled_font
workaround for https://github.com/Kozea/cairocffi/issues/88
-rw-r--r--pkgs/development/python-modules/cairocffi/fix_test_scaled_font.patch11
-rw-r--r--pkgs/top-level/python-packages.nix1
2 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/cairocffi/fix_test_scaled_font.patch b/pkgs/development/python-modules/cairocffi/fix_test_scaled_font.patch
new file mode 100644
index 0000000000000..39ba63cc94d19
--- /dev/null
+++ b/pkgs/development/python-modules/cairocffi/fix_test_scaled_font.patch
@@ -0,0 +1,11 @@
+--- a/cairocffi/test_cairo.py	2016-09-01 07:52:33.303180302 +0200
++++ b/cairocffi/test_cairo.py	2016-09-01 09:06:19.595701944 +0200
+@@ -998,7 +998,7 @@
+ 
+     font = ScaledFont(ToyFontFace('monospace'))
+     _, _, _, _, x_advance_mono, y_advance = font.text_extents('i' * 10)
+-    assert x_advance_mono > x_advance
++    assert x_advance_mono >= x_advance
+     assert y_advance == 0
+     # Not much we can test:
+     # The toy font face was "materialized" into a specific backend.
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index eaf8ee775f024..c65011cdb2888 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3121,6 +3121,7 @@ in modules // {
       })
 
       ../development/python-modules/cairocffi/dlopen-paths.patch
+      ../development/python-modules/cairocffi/fix_test_scaled_font.patch
     ];
 
     postPatch = ''