[Python-modules-commits] [cf-python] 03/04: merge patched into master

Klaus Zimmermann zklaus-guest at moszumanska.debian.org
Fri Sep 16 14:37:30 UTC 2016


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

zklaus-guest pushed a commit to branch master
in repository cf-python.

commit 9392fe6a06eee53362a0fe88d56a37d2a5147998
Merge: 4c00c83 c615699
Author: Klaus Zimmermann <klaus_zimmermann at gmx.de>
Date:   Fri Sep 16 11:11:55 2016 +0200

    merge patched into master

 debian/.git-dpm                      |   4 +-
 debian/patches/0005-Test-fixes.patch | 132 +++++++++++++++++++++++++++++++++++
 debian/patches/series                |   1 +
 test/test_Field.py                   |  39 +++++------
 test/test_Regrid.py                  |   2 +
 test/test_Variable.py                |  15 ++--
 test/test_general.py                 |   9 ++-
 7 files changed, 166 insertions(+), 36 deletions(-)

diff --cc debian/.git-dpm
index 60659d1,0000000..98c330b
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
 +# see git-dpm(1) from git-dpm package
- c48f0febdc84e387bbe377f83db5c4af05fb138e
- c48f0febdc84e387bbe377f83db5c4af05fb138e
++c615699148d8456593c072622745b89e058e8748
++c615699148d8456593c072622745b89e058e8748
 +a946e1c7699a0b716a845f590b53bc022f1e1cdc
 +a946e1c7699a0b716a845f590b53bc022f1e1cdc
 +cf-python_1.3.1+dfsg.1.orig.tar.gz
 +e98ea2bbde60a17d6b7177bee64bb6e3d0b293aa
 +2312964
diff --cc debian/patches/0005-Test-fixes.patch
index 0000000,0000000..3dc82da
new file mode 100644
--- /dev/null
+++ b/debian/patches/0005-Test-fixes.patch
@@@ -1,0 -1,0 +1,132 @@@
++From c615699148d8456593c072622745b89e058e8748 Mon Sep 17 00:00:00 2001
++From: Klaus Zimmermann <klaus_zimmermann at gmx.de>
++Date: Fri, 16 Sep 2016 11:11:48 +0200
++Subject: Test fixes
++
++Move some class variables to setUp methods in order to avoid import errors.
++Added skipping of tests relying on esmf.
++
++Signed-off-by: Klaus Zimmermann <klaus_zimmermann at gmx.de>
++---
++ test/test_Field.py    | 39 ++++++++++++++++++---------------------
++ test/test_Regrid.py   |  2 ++
++ test/test_Variable.py | 15 +++++++--------
++ test/test_general.py  |  9 ++++-----
++ 4 files changed, 31 insertions(+), 34 deletions(-)
++
++diff --git a/test/test_Field.py b/test/test_Field.py
++index 1816060..a144580 100644
++--- a/test/test_Field.py
+++++ b/test/test_Field.py
++@@ -6,27 +6,24 @@ import inspect
++ import datetime
++ 
++ class FieldTest(unittest.TestCase):
++-    filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
++-                            'test_file.nc')
++-
++-    filename2 = os.path.join(os.path.dirname(os.path.abspath(__file__)),
++-                             'test_file2.nc')
++-
++-    chunk_sizes = (17, 34, 300, 100000)[::-1]
++-    original_chunksize = cf.CHUNKSIZE()
++-
++-    f = cf.read(filename)[0]  
++-
++-    test_only = ()
++-#    test_only = ('test_Field_transpose','test_Field_squeeze',)
++-#    test_only = ('test_Field_collapse',)
++-#    test_only = ('test_Field_match','test_Field_items',)
++-#    test_only = ('test_Field_items',)
++-#    test_only = ('test_Field_axes','test_Field_data_axes',)
++-#    test_only = ('test_Field_where',)
++-#    test_only = ('test_Field_anchor',)
++-#    test_only = ('test_Field_period',)
++-#    test_only = ('test_FieldList_argless_methods',)
+++    def setUp(self):
+++        self.filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+++                                     'test_file.nc')
+++        self.filename2 = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+++                                      'test_file2.nc')
+++        self.chunk_sizes = (17, 34, 300, 100000)[::-1]
+++        self.original_chunksize = cf.CHUNKSIZE()
+++        self.f = cf.read(self.filename)[0]
+++        self.test_only = ()
+++        # self.test_only = ('test_Field_transpose','test_Field_squeeze',)
+++        # self.test_only = ('test_Field_collapse',)
+++        # self.test_only = ('test_Field_match','test_Field_items',)
+++        # self.test_only = ('test_Field_items',)
+++        # self.test_only = ('test_Field_axes','test_Field_data_axes',)
+++        # self.test_only = ('test_Field_where',)
+++        # self.test_only = ('test_Field_anchor',)
+++        # self.test_only = ('test_Field_period',)
+++        # self.test_only = ('test_FieldList_argless_methods',)
++ 
++     def test_Field_anchor(self):  
++         if self.test_only and inspect.stack()[0][3] not in self.test_only:
++diff --git a/test/test_Regrid.py b/test/test_Regrid.py
++index b182ac9..4eff69a 100644
++--- a/test/test_Regrid.py
+++++ b/test/test_Regrid.py
++@@ -38,6 +38,7 @@ class RegridTest(unittest.TestCase):
++ #    test_only('test_Field_section',)
++ #    test_only('test_Data_section',)
++ 
+++    @unittest.skipUnless(cf._found_ESMF, "Requires esmf package.")
++     def test_Field_regrids(self):
++         if self.test_only and inspect.stack()[0][3] not in self.test_only:
++             return
++@@ -72,6 +73,7 @@ class RegridTest(unittest.TestCase):
++         cf.ATOL(original_atol)
++     #--- End: def
++     
+++    @unittest.skipUnless(cf._found_ESMF, "Requires esmf package.")
++     def test_Field_regridc(self):
++         if self.test_only and inspect.stack()[0][3] not in self.test_only:
++             return
++diff --git a/test/test_Variable.py b/test/test_Variable.py
++index 97a47ba..e0dbe4c 100644
++--- a/test/test_Variable.py
+++++ b/test/test_Variable.py
++@@ -5,14 +5,13 @@ import unittest
++ import inspect
++ 
++ class VariableTest(unittest.TestCase):
++-    filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
++-                            'test_file.nc')
++-    chunk_sizes = (17, 34, 300, 100000)[::-1]
++-    original_chunksize = cf.CHUNKSIZE()
++-
++-    f = cf.read(filename)[0]  
++-
++-    test_only = ()
+++    def setUp(self):
+++        self.filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+++                                     'test_file.nc')
+++        self.chunk_sizes = (17, 34, 300, 100000)[::-1]
+++        self.original_chunksize = cf.CHUNKSIZE()
+++        self.f = cf.read(self.filename)[0]
+++        self.test_only = ()
++ 
++     def test_Variable_max_mean_mid_range_min_range_sd_sum_var(self):    
++         if self.test_only and inspect.stack()[0][3] not in self.test_only:
++diff --git a/test/test_general.py b/test/test_general.py
++index 340fd3b..f14d34f 100644
++--- a/test/test_general.py
+++++ b/test/test_general.py
++@@ -27,11 +27,10 @@ atexit.register(_remove_tmpfiles)
++ 
++ 
++ class generalTest(unittest.TestCase):
++-    filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
++-                            'test_file.nc')
++-    chunk_sizes = (17, 34, 300, 100000)[::-1]
++-
++-    f = cf.read(filename)[0]  
+++    def setUp(self):
+++        filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+++                                'test_file.nc')
+++        self.f = cf.read(filename)[0]
++ 
++     def test_GENERAL(self):
++         # Save original chunksize
diff --cc debian/patches/series
index fda2bb4,0000000..f79b0a7
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,4 -1,0 +1,5 @@@
 +0001-Remove-check-for-python-version.patch
 +0002-Added-stripping-of-type-lib.patch
 +0003-Patch-sphinx-config-to-avoid-network-access-and-add-.patch
 +0004-Remove-special-udunits2-database.patch
++0005-Test-fixes.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/cf-python.git



More information about the Python-modules-commits mailing list