[pycoast] 01/02: Skip offending tests

Antonio Valentino a_valentino-guest at moszumanska.debian.org
Sun Jul 3 10:34:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

a_valentino-guest pushed a commit to branch master
in repository pycoast.

commit 7408aec2db826eb58ce2b042a5bf24e541415eba
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Sun Jul 3 10:27:27 2016 +0000

    Skip offending tests
---
 debian/changelog                                   |  4 ++
 .../0001-Skip-test-in-ContourWriterAGG.patch       | 29 ++++++++++
 debian/patches/0002-Skip-offending-tests.patch     | 67 ++++++++++++++++++++++
 debian/patches/series                              |  2 +
 4 files changed, 102 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 5b2f645..d3bd027 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,10 @@ pycoast (0.5.4-1) UNRELEASED; urgency=medium
     - standard version bumped to 3.9.8 (no change)
   * debian/patches
     - drop 0001-fix-egginfo.patch: no longer necesary
+    - new 0001-Skip-test-in-ContourWriterAGG.patch for skipping test on
+      ContourWriterAGG if the drawagg module is not available
+    - new 0002-Skip-offending-tests.patch for skipping offending tests
+      (see also https://github.com/pytroll/pycoast/issues/4)
   * debian/copyright
     - fix DEP-5 URL
 
diff --git a/debian/patches/0001-Skip-test-in-ContourWriterAGG.patch b/debian/patches/0001-Skip-test-in-ContourWriterAGG.patch
new file mode 100644
index 0000000..beecb80
--- /dev/null
+++ b/debian/patches/0001-Skip-test-in-ContourWriterAGG.patch
@@ -0,0 +1,29 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sun, 3 Jul 2016 08:37:01 +0000
+Subject: Skip test in ContourWriterAGG
+
+---
+ pycoast/tests/test_pycoast.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/pycoast/tests/test_pycoast.py b/pycoast/tests/test_pycoast.py
+index 8675a58..98e61bf 100644
+--- a/pycoast/tests/test_pycoast.py
++++ b/pycoast/tests/test_pycoast.py
+@@ -21,7 +21,7 @@ import unittest
+ import numpy as np
+ from PIL import Image, ImageFont
+ 
+-from pycoast import ContourWriter
++from pycoast import ContourWriter, ContourWriterAGG
+ 
+ 
+ def tmp(f):
+@@ -305,6 +305,7 @@ class TestPIL(TestPycoast):
+         self.failUnless(fft_metric(grid_data, res), 'Writing of Brazil shapefiles failed')
+ 
+ 
++ at unittest.skipIf(ContourWriterAGG is ContourWriter, 'aggdraw not available')
+ class TestPILAGG(TestPycoast):
+     def test_europe_agg(self):
+         from pycoast import ContourWriterAGG
diff --git a/debian/patches/0002-Skip-offending-tests.patch b/debian/patches/0002-Skip-offending-tests.patch
new file mode 100644
index 0000000..de1acee
--- /dev/null
+++ b/debian/patches/0002-Skip-offending-tests.patch
@@ -0,0 +1,67 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sun, 3 Jul 2016 10:21:52 +0000
+Subject: Skip offending tests
+
+See also https://github.com/pytroll/pycoast/issues/4
+---
+ pycoast/tests/test_pycoast.py | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/pycoast/tests/test_pycoast.py b/pycoast/tests/test_pycoast.py
+index 98e61bf..6cd0230 100644
+--- a/pycoast/tests/test_pycoast.py
++++ b/pycoast/tests/test_pycoast.py
+@@ -1,5 +1,5 @@
+ # pycoast, Writing of coastlines, borders and rivers to images in Python
+-# 
++#
+ # Copyright (C) 2011  Esben S. Nielsen
+ #
+ # This program is free software: you can redistribute it and/or modify
+@@ -131,6 +131,7 @@ class TestPIL(TestPycoast):
+         res = np.array(img)
+         self.failUnless(fft_metric(geos_data, res), 'Writing of geos contours failed')
+ 
++    @unittest.skip('invalid dataset: grid_europe.png')
+     def test_grid(self):
+         grid_img = Image.open(os.path.join(os.path.dirname(__file__),
+                                            'grid_europe.png'))
+@@ -165,6 +166,7 @@ class TestPIL(TestPycoast):
+         res = np.array(img)
+         self.failUnless(fft_metric(geos_data, res), 'Writing of geos contours failed')
+ 
++    @unittest.skip('invalid dataset: grid_europe.png')
+     def test_grid_file(self):
+         grid_img = Image.open(os.path.join(os.path.dirname(__file__),
+                                            'grid_europe.png'))
+@@ -184,6 +186,7 @@ class TestPIL(TestPycoast):
+         res = np.array(img)
+         self.failUnless(fft_metric(grid_data, res), 'Writing of grid failed')
+ 
++    @unittest.skip('invalid dataset: dateline_cross.png')
+     def test_dateline_cross(self):
+         dl_img = Image.open(os.path.join(os.path.dirname(__file__),
+                                          'dateline_cross.png'))
+@@ -205,6 +208,7 @@ class TestPIL(TestPycoast):
+         res = np.array(img)
+         self.failUnless(fft_metric(dl_data, res), 'Writing of dateline crossing data failed')
+ 
++    @unittest.skip('invalid dataset: dateline_boundary_cross.png')
+     def test_dateline_boundary_cross(self):
+         dl_img = Image.open(os.path.join(os.path.dirname(__file__),
+                                          'dateline_boundary_cross.png'))
+@@ -226,6 +230,7 @@ class TestPIL(TestPycoast):
+         res = np.array(img)
+         self.failUnless(fft_metric(dl_data, res), 'Writing of dateline boundary crossing data failed')
+ 
++    @unittest.skip('invalid dataset: grid_nh.png')
+     def test_grid_nh(self):
+         grid_img = Image.open(os.path.join(os.path.dirname(__file__),
+                                            'grid_nh.png'))
+@@ -534,4 +539,4 @@ def suite():
+     mysuite.addTest(loader.loadTestsFromTestCase(TestPIL))
+     mysuite.addTest(loader.loadTestsFromTestCase(TestPILAGG))
+ 
+-    return mysuite
+\ No newline at end of file
++    return mysuite
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4a8d90f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Skip-test-in-ContourWriterAGG.patch
+0002-Skip-offending-tests.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pycoast.git



More information about the Pkg-grass-devel mailing list