[pyresample] 12/16: Skip tests that require basemap

Antonio Valentino a_valentino-guest at moszumanska.debian.org
Sat Jul 11 19:52:38 UTC 2015


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

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

commit 1080b41e4b6644575ef7e129a9bb26fb617c64e1
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Sat Jul 11 20:59:57 2015 +0200

    Skip tests that require basemap
---
 debian/changelog                             |  5 ++-
 debian/patches/0001-skip-basemap-tests.patch | 56 ++++++++++++++++++++++++++++
 debian/patches/series                        |  1 +
 3 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index c773157..f12307c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,7 +5,10 @@ pyresample (1.1.3-1) UNRELEASED; urgency=medium
   * Updated copyright file: upstream license change form GPL to LGPL
   * Update upstream project home page
   * Standards version updated to 3.9.6 (no changes)
-  * Drop debian/patches: no longer necessary
+  * debian/patches
+    - drop longer necessary patches
+    - new patch for skipping tests that require basemap when it is
+      not abailable
   * debian/control
     - removed Provides field from the binary package section in the
       control file. It is not necessary
diff --git a/debian/patches/0001-skip-basemap-tests.patch b/debian/patches/0001-skip-basemap-tests.patch
new file mode 100644
index 0000000..2603503
--- /dev/null
+++ b/debian/patches/0001-skip-basemap-tests.patch
@@ -0,0 +1,56 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sat, 11 Jul 2015 20:57:24 +0200
+Subject: skip basemap tests
+
+---
+ pyresample/test/test_plot.py | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/pyresample/test/test_plot.py b/pyresample/test/test_plot.py
+index f2cd261..6de7fec 100644
+--- a/pyresample/test/test_plot.py
++++ b/pyresample/test/test_plot.py
+@@ -11,6 +11,11 @@ try:
+ except ImportError:
+     pass  # Postpone fail to individual tests
+ 
++try:
++    from mpl_toolkits.basemap import Basemap
++except ImportError:
++    Basemap = None
++
+ 
+ def tmp(f):
+     f.tmp = True
+@@ -40,6 +45,7 @@ class Test(unittest.TestCase):
+         self.assertAlmostEqual(b, 6356752.3142451793,
+                                msg='Failed to get semi-minor axis of ellipsis')
+ 
++    @unittest.skipIf(not Basemap, "basemap not available")
+     def test_area_def2basemap(self):
+         area_def = utils.parse_area_file(os.path.join(os.path.dirname(__file__),
+                                                       'test_files', 'areas.cfg'), 'ease_sh')[0]
+@@ -48,6 +54,7 @@ class Test(unittest.TestCase):
+                         bmap.rmajor == 6371228.0,
+                         'Failed to create Basemap object')
+ 
++    @unittest.skipIf(not Basemap, "basemap not available")
+     def test_plate_carreeplot(self):
+         area_def = utils.parse_area_file(os.path.join(os.path.dirname(__file__),
+                                                       'test_files', 'areas.cfg'), 'pc_world')[0]
+@@ -58,6 +65,7 @@ class Test(unittest.TestCase):
+         plt = plot._get_quicklook(area_def, result, num_meridians=0,
+                                   num_parallels=0)
+ 
++    @unittest.skipIf(not Basemap, "basemap not available")
+     def test_easeplot(self):
+         area_def = utils.parse_area_file(os.path.join(os.path.dirname(__file__),
+                                                       'test_files', 'areas.cfg'), 'ease_sh')[0]
+@@ -67,6 +75,7 @@ class Test(unittest.TestCase):
+                                           fill_value=None)
+         plt = plot._get_quicklook(area_def, result)
+ 
++    @unittest.skipIf(not Basemap, "basemap not available")
+     def test_orthoplot(self):
+         area_def = utils.parse_area_file(os.path.join(os.path.dirname(__file__),
+                                                       'test_files', 'areas.cfg'), 'ortho')[0]
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1ab3d55
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-skip-basemap-tests.patch

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



More information about the Pkg-grass-devel mailing list