[python-astropy] 02/02: Backport test parallelization ion the hope to speedup tests and avoid killing of test process
Ole Streicher
olebole-guest at moszumanska.debian.org
Wed Dec 11 08:38:42 UTC 2013
This is an automated email from the git hooks/post-receive script.
olebole-guest pushed a commit to branch debian
in repository python-astropy.
commit e2979c94207bda251099342ad176508094f03a2c
Author: Ole Streicher <debian at liska.ath.cx>
Date: Wed Dec 11 09:38:34 2013 +0100
Backport test parallelization ion the hope to speedup tests and avoid killing of test process
---
debian/patches/parallel_fk4_no_fk4.pytch | 65 ++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 66 insertions(+)
diff --git a/debian/patches/parallel_fk4_no_fk4.pytch b/debian/patches/parallel_fk4_no_fk4.pytch
new file mode 100644
index 0000000..e46a321
--- /dev/null
+++ b/debian/patches/parallel_fk4_no_fk4.pytch
@@ -0,0 +1,65 @@
+From 830e4e97ad161342d2df6feff4568a49e05d6fe4 Mon Sep 17 00:00:00 2001
+From: Michael Droettboom <mdboom at gmail.com>
+Date: Tue, 10 Dec 2013 10:59:25 -0500
+Subject: [PATCH] Speed up fk4_no_e_fk4 test.
+
+---
+ .../tests/accuracy/test_fk4_no_e_fk4.py | 41 ++++++++++------------
+ 1 file changed, 18 insertions(+), 23 deletions(-)
+
+--- a/astropy/coordinates/tests/accuracy/test_fk4_no_e_fk4.py
++++ b/astropy/coordinates/tests/accuracy/test_fk4_no_e_fk4.py
+@@ -25,31 +25,26 @@
+
+ t = Table.read(os.path.join(ROOT, 'fk4_no_e_fk4.csv'), format='ascii')
+
+- for i in range(len(t)):
++ # FK4 to FK5
++ c1 = FK4(t['ra_in'], t['dec_in'],
++ unit=(u.degree, u.degree),
++ obstime=Time(t['obstime'], scale='utc'))
++ c2 = c1.transform_to(FK4NoETerms)
++
++ # Find difference
++ diff = angular_separation(c2.ra.radian, c2.dec.radian,
++ np.radians(t['ra_fk4ne']), np.radians(t['dec_fk4ne']))
++
++ assert np.all(np.degrees(diff) * 3600. < TOLERANCE)
++
++ # FK5 to FK4
++ c1 = FK4NoETerms(t['ra_in'], t['dec_in'],
++ unit=(u.degree, u.degree),
++ obstime=Time(t['obstime'], scale='utc'))
++ c2 = c1.transform_to(FK4)
++
++ # Find difference
++ diff = angular_separation(c2.ra.radian, c2.dec.radian,
++ np.radians(t['ra_fk4']), np.radians(t['dec_fk4']))
+
+- # Extract row
+- r = t[i]
+-
+- # FK4 to FK5
+- c1 = FK4(r['ra_in'], r['dec_in'],
+- unit=(u.degree, u.degree),
+- obstime=Time(r['obstime'], scale='utc'))
+- c2 = c1.transform_to(FK4NoETerms)
+-
+- # Find difference
+- diff = angular_separation(c2.ra.radian, c2.dec.radian,
+- np.radians(r['ra_fk4ne']), np.radians(r['dec_fk4ne']))
+-
+- assert np.degrees(diff) * 3600. < TOLERANCE
+-
+- # FK5 to FK4
+- c1 = FK4NoETerms(r['ra_in'], r['dec_in'],
+- unit=(u.degree, u.degree),
+- obstime=Time(r['obstime'], scale='utc'))
+- c2 = c1.transform_to(FK4)
+-
+- # Find difference
+- diff = angular_separation(c2.ra.radian, c2.dec.radian,
+- np.radians(r['ra_fk4']), np.radians(r['dec_fk4']))
+-
+- assert np.degrees(diff) * 3600. < TOLERANCE
++ assert np.all(np.degrees(diff) * 3600. < TOLERANCE)
diff --git a/debian/patches/series b/debian/patches/series
index c8093a8..fd89cb2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
mark_known_failures.patch
+parallel_fk4_no_fk4.pytch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-astropy.git
More information about the debian-science-commits
mailing list