1
0
python-astropy/astropy-pr10545-remove-newline-3d_cd_hdr.patch
Tomáš Chvátal 82ad95d973 Accepting request 821523 from home:bnavigator:branches:devel:languages:python:numeric
:test flavor is currently failing but undetected!

- actually detect unit test failures with sys.exit(astropy.tests())
- do not fail on DeprecationWarnings
- support updated system lib wcslib 7.3 with
  astropy-pr10433-wcslib73-tests.patch gh#astropy/astropy#10433
  astropy-pr10440-wcs-datfix.patch gh#astropy/astropy#10440
- clean up blank lines after pytest report and prevent possible
  failure of tests depending on test order
  astropy-pr10545-remove-newline-3d_cd_hdr.patch
  gh#astropy/astropy#10545

OBS-URL: https://build.opensuse.org/request/show/821523
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-astropy?expand=0&rev=32
2020-07-17 19:10:50 +00:00

55 lines
3.9 KiB
Diff

From e87d4647f2b152b33ef4c22edc2daf16b1dbc1bc Mon Sep 17 00:00:00 2001
From: Mihai Cara <mihail.cara@gmail.com>
Date: Wed, 8 Jul 2020 13:14:01 -0400
Subject: [PATCH] Remove newline characters from header file 3d_cd.hdr
---
astropy/wcs/tests/data/3d_cd.hdr | 17 +----------------
astropy/wcs/tests/test_wcs.py | 9 ++++-----
2 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/astropy/wcs/tests/data/3d_cd.hdr b/astropy/wcs/tests/data/3d_cd.hdr
index be4ce2f1f88..8791e9d35e8 100644
--- a/astropy/wcs/tests/data/3d_cd.hdr
+++ b/astropy/wcs/tests/data/3d_cd.hdr
@@ -1,16 +1 @@
-CD1_2 = -3.72E-05
-CD1_3 = 0
-CD1_1 = -4.12E-05
-CUNIT3 = 'nm '
-CUNIT2 = 'deg '
-CTYPE1 = 'RA---TAN'
-NAXIS = 3
-CTYPE3 = 'AWAV '
-CD2_1 = -3.72E-05
-CTYPE2 = 'DEC--TAN'
-CD2_3 = 0
-CD2_2 = 4.12E-05
-CUNIT1 = 'deg '
-CD3_1 = 0
-CD3_2 = 0
-CD3_3 = 0.2
\ No newline at end of file
+CD1_2 = -3.72E-05 CD1_3 = 0 CD1_1 = -4.12E-05 CUNIT3 = 'nm ' CUNIT2 = 'deg ' CTYPE1 = 'RA---TAN' NAXIS = 3 CTYPE3 = 'AWAV ' CD2_1 = -3.72E-05 CTYPE2 = 'DEC--TAN' CD2_3 = 0 CD2_2 = 4.12E-05 CUNIT1 = 'deg ' CD3_1 = 0 CD3_2 = 0 CD3_3 = 0.2
\ No newline at end of file
diff --git a/astropy/wcs/tests/test_wcs.py b/astropy/wcs/tests/test_wcs.py
index 509d3e916a3..cd180952458 100644
--- a/astropy/wcs/tests/test_wcs.py
+++ b/astropy/wcs/tests/test_wcs.py
@@ -823,11 +823,10 @@ def test_printwcs(capsys):
captured = capsys.readouterr()
assert 'WCS Keywords' in captured.out
h = get_pkg_data_contents('data/3d_cd.hdr', encoding='binary')
- with pytest.warns(AstropyUserWarning):
- w = wcs.WCS(h)
- w.printwcs()
- captured = capsys.readouterr()
- assert 'WCS Keywords' in captured.out
+ w = wcs.WCS(h)
+ w.printwcs()
+ captured = capsys.readouterr()
+ assert 'WCS Keywords' in captured.out
def test_invalid_spherical():