[Debian-astro-commits] [python-pywcs] 01/01: Include unit test.
Ole Streicher
olebole at moszumanska.debian.org
Fri Feb 5 09:00:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
olebole pushed a commit to branch debian
in repository python-pywcs.
commit 078e81b4dff19899a1f28b6d42220c7a0ad39cec
Author: Ole Streicher <ole at aip.de>
Date: Fri Feb 5 09:57:49 2016 +0100
Include unit test.
---
debian/changelog | 6 ++++++
debian/patches/pywcs-unbundle.patch | 21 +++++----------------
debian/patches/series | 1 +
debian/patches/update_tests.patch | 22 ++++++++++++++++++++++
debian/tests/control | 3 +++
5 files changed, 37 insertions(+), 16 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 0c9636a..5898c4c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-pywcs (1.12-4) unstable; urgency=low
+
+ * Include unit test.
+
+ -- Ole Streicher <olebole at debian.org> Fri, 05 Feb 2016 09:57:13 +0100
+
python-pywcs (1.12-3) unstable; urgency=medium
* Include the definition of "struct tabprm". Closes: #809286
diff --git a/debian/patches/pywcs-unbundle.patch b/debian/patches/pywcs-unbundle.patch
index 03d6391..0342d75 100644
--- a/debian/patches/pywcs-unbundle.patch
+++ b/debian/patches/pywcs-unbundle.patch
@@ -3,7 +3,7 @@ Description: Use the wcslib provided by the Debian system instead of the
convienience copy in the upstream package.
--- a/defsetup.py
+++ b/defsetup.py
-@@ -407,22 +407,21 @@
+@@ -407,18 +407,17 @@
PYWCS_EXTENSIONS = [
Extension('pywcs._pywcs',
@@ -25,22 +25,11 @@ Description: Use the wcslib provided by the Debian system instead of the
)
]
--pkg = ["pywcs", "pywcs.tests"]
-+pkg = ["pywcs" ]
-
- setupargs = {
- 'version' : VERSION,
-@@ -434,12 +433,7 @@
+@@ -434,7 +433,6 @@
'ext_modules' : PYWCS_EXTENSIONS,
'data_files' : [
( 'pywcs/include', ['src/*.h']),
- ( 'pywcs/include/wcslib', [ WCSLIBC + '/*.h'] ),
-- ( 'pywcs/tests/maps', ['lib/pywcs/tests/maps/*.hdr']),
-- ( 'pywcs/tests/nrao', ['lib/pywcs/tests/nrao/*.hdr']),
-- ( 'pywcs/tests/spectra', ['lib/pywcs/tests/spectra/*.hdr']),
-- ( 'pywcs/tests/data', ['lib/pywcs/tests/data/*.hdr', 'lib/pywcs/tests/data/*.fits'])
- ],
-- 'package_dir' : { 'pywcs' : 'lib/pywcs', 'pywcs.tests' : 'lib/pywcs/tests'},
-+ 'package_dir' : { 'pywcs' : 'lib/pywcs'},
- }
-
+ ( 'pywcs/tests/maps', ['lib/pywcs/tests/maps/*.hdr']),
+ ( 'pywcs/tests/nrao', ['lib/pywcs/tests/nrao/*.hdr']),
+ ( 'pywcs/tests/spectra', ['lib/pywcs/tests/spectra/*.hdr']),
diff --git a/debian/patches/series b/debian/patches/series
index 4c8158c..66f3841 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
pywcs-unbundle.patch
use_stsci_distutils_hack.patch
define_tabprm.patch
+update_tests.patch
diff --git a/debian/patches/update_tests.patch b/debian/patches/update_tests.patch
new file mode 100644
index 0000000..b9c7410
--- /dev/null
+++ b/debian/patches/update_tests.patch
@@ -0,0 +1,22 @@
+Author: Ole Streicher <olebole at debian.org>
+Description: Update tests to current wcslib behaviour
+--- a/lib/pywcs/tests/test_wcsprm.py
++++ b/lib/pywcs/tests/test_wcsprm.py
+@@ -544,7 +544,7 @@
+
+ def test_velangl():
+ w = _pywcs._Wcsprm()
+- assert w.velangl == 0.0
++ assert np.isnan(w.velangl)
+ w.velangl = 42.0
+ assert w.velangl == 42.0
+ del w.velangl
+@@ -573,7 +573,7 @@
+ assert w.get_pc().shape == (3, 3)
+ assert w.get_cdelt().shape == (3,)
+
+- at raises(RuntimeError)
++ at raises(ValueError)
+ def test_get_pc():
+ header = open(os.path.join(ROOT_DIR, 'data', '3d_cd.hdr'), 'rb').read()
+ w = _pywcs._Wcsprm(header)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..40ad260
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Test-Command: cd $ADTTMP && python -c "import pywcs; pywcs.test()"
+Depends: python-pywcs
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/python-pywcs.git
More information about the Debian-astro-commits
mailing list