summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2016-03-17 18:24:48 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2016-03-18 20:10:29 +0000
commit74951654691dd578db646dec8591eab10f642667 (patch)
tree48c703ea3a892c6df11b6229bc71ee6ed31cf169 /dev-python/astropy/files
parentdev-python/ccdproc: Version bump (diff)
downloadgentoo-74951654691dd578db646dec8591eab10f642667.tar.gz
gentoo-74951654691dd578db646dec8591eab10f642667.tar.bz2
gentoo-74951654691dd578db646dec8591eab10f642667.zip
dev-python/astropy: Version bump
Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-python/astropy/files')
-rw-r--r--dev-python/astropy/files/astropy-1.1.2-cfitsio-338.patch35
-rw-r--r--dev-python/astropy/files/astropy-1.1.2-fix-for-pytest-28.patch37
2 files changed, 72 insertions, 0 deletions
diff --git a/dev-python/astropy/files/astropy-1.1.2-cfitsio-338.patch b/dev-python/astropy/files/astropy-1.1.2-cfitsio-338.patch
new file mode 100644
index 000000000000..d4a8fa072c5d
--- /dev/null
+++ b/dev-python/astropy/files/astropy-1.1.2-cfitsio-338.patch
@@ -0,0 +1,35 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Make TFORMx check more flexible
+ The maximal column length in cfitsio changed between version 3370 and 3380.
+ This patch checks their syntax, without a specific length.
+Bug: https://github.com/astropy/astropy/issues/4646
+--- a/astropy/io/fits/tests/test_image.py
++++ b/astropy/io/fits/tests/test_image.py
+@@ -4,6 +4,7 @@
+
+ import math
+ import os
++import re
+ import time
+ import warnings
+
+@@ -1010,7 +1011,7 @@
+ hdu.writeto(self.temp('test.fits'))
+
+ with fits.open(self.temp('test.fits')) as hdul:
+- assert (hdul['SCI'].data == cube).all()
++ assert np.abs(hdul['SCI'].data - cube).max() < 1./15.
+
+ def test_subtractive_dither_seed(self):
+ """
+@@ -1265,8 +1266,8 @@
+
+ with fits.open(self.temp('test.fits'),
+ disable_image_compression=True) as h:
+- assert h[1].header['TFORM1'] == '1PB(30)'
+- assert h[1].header['TFORM2'] == '1PB(359)'
++ assert re.match(r'^1PB\(\d+\)$', h[1].header['TFORM1'])
++ assert re.match(r'^1PB\(\d+\)$', h[1].header['TFORM2'])
+
+ def test_compression_update_header(self):
+ """Regression test for
diff --git a/dev-python/astropy/files/astropy-1.1.2-fix-for-pytest-28.patch b/dev-python/astropy/files/astropy-1.1.2-fix-for-pytest-28.patch
new file mode 100644
index 000000000000..0d62e9c963a4
--- /dev/null
+++ b/dev-python/astropy/files/astropy-1.1.2-fix-for-pytest-28.patch
@@ -0,0 +1,37 @@
+From e904df784b91fd45e7dfcdec0713c471bb03efff Mon Sep 17 00:00:00 2001
+From: Thomas Robitaille <thomas.robitaille@gmail.com>
+Date: Fri, 1 Jan 2016 19:36:39 +0000
+Bug: https://bugs.debian.org/812648
+Bug: https://github.com/astropy/astropy/pull/4349
+Subject: [PATCH] Fixes to pytest plugins for pytest >= 2.8.0
+--- a/astropy/tests/pytest_plugins.py
++++ b/astropy/tests/pytest_plugins.py
+@@ -161,7 +161,10 @@
+ # handling __doctest_skip__) doesn't happen.
+ def collect(self):
+ if self.fspath.basename == "conftest.py":
+- module = self.config._conftest.importconftest(self.fspath)
++ try:
++ module = self.config._conftest.importconftest(self.fspath)
++ except AttributeError: # pytest >= 2.8.0
++ module = self.config.pluginmanager._importconftest(self.fspath)
+ else:
+ try:
+ module = self.fspath.pyimport()
+@@ -191,8 +194,14 @@
+ def runtest(self):
+ # satisfy `FixtureRequest` constructor...
+ self.funcargs = {}
+- self._fixtureinfo = doctest_plugin.FuncFixtureInfo((), [], {})
+- fixture_request = doctest_plugin.FixtureRequest(self)
++ try:
++ self._fixtureinfo = doctest_plugin.FuncFixtureInfo((), [], {})
++ fixture_request = doctest_plugin.FixtureRequest(self)
++ except AttributeError: # pytest >= 2.8.0
++ python_plugin = config.pluginmanager.getplugin('python')
++ self._fixtureinfo = python_plugin.FuncFixtureInfo((), [], {})
++ fixture_request = python_plugin.FixtureRequest(self)
++
+ failed, tot = doctest.testfile(
+ str(self.fspath), module_relative=False,
+ optionflags=opts, parser=DocTestParserPlus(),