astropy/astropy — Issue #143: 3 io.vo tests failing on Windows
Author: iguananaut
Created: 2012-02-03 19:07:19+00:00
State: open
Labels: io.vo

Here's a snipped copy of the error output:

```
=================================== FAILURES ===================================
_____________________________ test_local_data_obj ______________________________

def test_local_data_obj():
from ..data import get_data_fileobj

with get_data_fileobj('data/local.dat') as f:
f.readline()
> assert f.read()==b'CONTENT\n'
E assert 'CONTENT\r\n' == 'CONTENT\n'
E CONTENT

astropy\config\tests\test_data.py:46: AssertionError
_______________________________ test_regression ________________________________

@pytest.mark.xfail('pyfits304x')
def test_regression():
> _test_regression(False)

astropy\io\vo\tests\vo_test.py:190:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_python_based = False

def _test_regression(_python_based=False):
# Read the VOTABLE
votable = parse(
get_data_filename('data/regression.xml'),
pedantic=False,
_debug_python_based_parser=_python_based)
table = votable.get_first_table()

assert table.array.dtype == [
(('string test', 'string_test'), '|O8'),
(('fixed string test', 'string_test_2'), '|S10'),
('unicode_test', '|O8'),
(('unicode test', 'fixed_unicode_test'), ' assert truth == output
E assert ['\r\n' != '\n'

astropy\io\vo\tests\vo_test.py:175: AssertionError
------------------------------- Captured stdout --------------------------------
astropy\io\vo\exceptions.py:71: E02: c:\windows\temp\tmpvr5w9j\regression.binary.xml:16:1: E02: Incorrect number of elements in array. Expected multiple of 0, got 2
warn(warning)
astropy\io\vo\exceptions.py:71: W48: c:\windows\temp\tmpvr5w9j\regression.binary.xml:45:5: W48: Unknown attribute 'value' on OPTION
warn(warning)
astropy\io\vo\exceptions.py:71: E02: c:\windows\temp\tmpvr5w9j\regression.binary.xml:167:7: E02: Incorrect number of elements in array. Expected multiple of 4, got 1
warn(warning)
astropy\io\vo\exceptions.py:71: W49: c:\windows\temp\tmpvr5w9j\regression.binary.xml:167:7: W49: Empty cell illegal for integer fields.
warn(warning)
---
+++
@@ -1,302 +1,302 @@
-\r
-\r
-\r
- \r
- The VOTable format is an XML standard for the interchange of data\r
- represented as a set of tables. In this context, a table is an\r
- unordered set of rows, each of a uniform format, as specified in the\r
- table metadata. Each row in a table is a sequence of table cells,\r
- and each of these contains either a primitive data type, or an array\r
- of such primitives. VOTable is derived from the Astrores format [1],\r
- itself modeled on the FITS Table format [2]; VOTable was designed to\r
- be closer to the FITS Binary Table format.\r
- \r
- \r
- \r
- \r
- \r
- This is the most interesting parameter in the world, and it drinks\r
- Dos Equis\r
- \r
- \r
...snip...
-\r
+
+
+
+
+ The VOTable format is an XML standard for the interchange of data
+ represented as a set of tables. In this context, a table is an
+ unordered set of rows, each of a uniform format, as specified in the
+ table metadata. Each row in a table is a sequence of table cells,
+ and each of these contains either a primitive data type, or an array
+ of such primitives. VOTable is derived from the Astrores format [1],
+ itself modeled on the FITS Table format [2]; VOTable was designed to
+ be closer to the FITS Binary Table format.
+
+
+
+
+
+ This is the most interesting parameter in the world, and it drinks
+ Dos Equis
+
+
...snip...
+
_____________________ test_regression_python_based_parser ______________________

@pytest.mark.xfail('pyfits304x')
def test_regression_python_based_parser():
> _test_regression(True)

astropy\io\vo\tests\vo_test.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_python_based = True

def _test_regression(_python_based=False):
# Read the VOTABLE
votable = parse(
get_data_filename('data/regression.xml'),
pedantic=False,
_debug_python_based_parser=_python_based)
table = votable.get_first_table()

assert table.array.dtype == [
(('string test', 'string_test'), '|O8'),
(('fixed string test', 'string_test_2'), '|S10'),
('unicode_test', '|O8'),
(('unicode test', 'fixed_unicode_test'), ' assert truth == output
E assert ['\r\n' != '\n'

astropy\io\vo\tests\vo_test.py:175: AssertionError
------------------------------- Captured stdout --------------------------------
astropy\io\vo\exceptions.py:71: W17: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:89:2: W17: GROUP element contains more than one DESCRIPTION element
warn(warning)
astropy\io\vo\exceptions.py:71: W46: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:103:28: W46: char value is too long for specified length of 10
warn(warning)
astropy\io\vo\exceptions.py:71: W46: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:105:28: W46: unicodeChar value is too long for specified length of 10
warn(warning)
astropy\io\vo\exceptions.py:71: W46: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:106:11: W46: char value is too long for specified length of 4
warn(warning)
astropy\io\vo\exceptions.py:71: E02: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:125:7: E02: Incorrect number of elements in array. Expected multiple of 4, got 1
warn(warning)
astropy\io\vo\exceptions.py:71: W49: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:125:7: W49: Empty cell illegal for integer fields.
warn(warning)
astropy\io\vo\exceptions.py:71: W46: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:133:17: W46: char value is too long for specified length of 10
warn(warning)
astropy\io\vo\exceptions.py:71: W46: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:136:17: W46: char value is too long for specified length of 4
warn(warning)
astropy\io\vo\exceptions.py:71: W49: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:140:6: W49: Empty cell illegal for integer fields.
warn(warning)
astropy\io\vo\exceptions.py:71: W01: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:143:18: W01: Array uses commas rather than whitespace
warn(warning)
astropy\io\vo\exceptions.py:71: E02: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:159:7: E02: Incorrect number of elements in array. Expected multiple of 16, got 0
warn(warning)
astropy\io\vo\exceptions.py:71: W49: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:159:7: W49: Empty cell illegal for integer fields.
warn(warning)
astropy\io\vo\exceptions.py:71: W49: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:159:7: W49: Empty cell illegal for integer fields. (suppressing further warnings of this type...)
warn(warning)
astropy\io\vo\exceptions.py:71: W46: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:165:17: W46: unicodeChar value is too long for specified length of 10
warn(warning)
astropy\io\vo\exceptions.py:71: E02: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:189:7: E02: Incorrect number of elements in array. Expected multiple of 16, got 0
warn(warning)
astropy\io\vo\exceptions.py:71: W01: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:203:13: W01: Array uses commas rather than whitespace
warn(warning)
astropy\io\vo\exceptions.py:71: E02: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:205:7: E02: Incorrect number of elements in array. Expected multiple of 6, got 0
warn(warning)
astropy\io\vo\exceptions.py:71: E02: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:213:7: E02: Incorrect number of elements in array. Expected multiple of 4, got 1
warn(warning)
astropy\io\vo\exceptions.py:71: E02: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:219:7: E02: Incorrect number of elements in array. Expected multiple of 16, got 0
warn(warning)
astropy\io\vo\exceptions.py:71: W01: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:233:12: W01: Array uses commas rather than whitespace
warn(warning)
astropy\io\vo\exceptions.py:71: E02: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:235:7: E02: Incorrect number of elements in array. Expected multiple of 6, got 0
warn(warning)
astropy\io\vo\exceptions.py:71: E02: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:243:7: E02: Incorrect number of elements in array. Expected multiple of 4, got 1
warn(warning)
astropy\io\vo\exceptions.py:71: E02: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:245:7: E02: Incorrect number of elements in array. Expected multiple of 4, got 1 (suppressing further warnings of this type...)
warn(warning)
astropy\io\vo\exceptions.py:71: W46: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:263:28: W46: char value is too long for specified length of 10
warn(warning)
astropy\io\vo\exceptions.py:71: W46: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:265:28: W46: unicodeChar value is too long for specified length of 10
warn(warning)
astropy\io\vo\exceptions.py:71: W46: C:\Program Files\Jenkins\jobs\astropy-winxp-py2.7-np1.6\workspace\build\lib.win32-2.7\astropy\io\vo\tests\data/regression.xml:266:11: W46: char value is too long for specified length of 4
warn(warning)
astropy\io\vo\exceptions.py:71: W39: ?:?:?: W39: Bit values can not be masked (suppressing further warnings of this type...)
warn(warning)
astropy\io\vo\exceptions.py:71: E02: c:\windows\temp\tmpvr5w9j\regression.binary.xml:167:12: E02: Incorrect number of elements in array. Expected multiple of 4, got 1
warn(warning)
astropy\io\vo\exceptions.py:71: W49: c:\windows\temp\tmpvr5w9j\regression.binary.xml:167:12: W49: Empty cell illegal for integer fields.
warn(warning)
---
+++
@@ -1,302 +1,302 @@
-\r
-\r
-\r
- \r
- The VOTable format is an XML standard for the interchange of data\r
- represented as a set of tables. In this context, a table is an\r
- unordered set of rows, each of a uniform format, as specified in the\r
- table metadata. Each row in a table is a sequence of table cells,\r
- and each of these contains either a primitive data type, or an array\r
- of such primitives. VOTable is derived from the Astrores format [1],\r
- itself modeled on the FITS Table format [2]; VOTable was designed to\r
- be closer to the FITS Binary Table format.\r
- \r
- \r
- \r
- \r
- \r
- This is the most interesting parameter in the world, and it drinks\r
- Dos Equis\r
- \r
- \r
...snip...
-\r
+
+
+
+
+ The VOTable format is an XML standard for the interchange of data
+ represented as a set of tables. In this context, a table is an
+ unordered set of rows, each of a uniform format, as specified in the
+ table metadata. Each row in a table is a sequence of table cells,
+ and each of these contains either a primitive data type, or an array
+ of such primitives. VOTable is derived from the Astrores format [1],
+ itself modeled on the FITS Table format [2]; VOTable was designed to
+ be closer to the FITS Binary Table format.
+
+
+
+
+
+ This is the most interesting parameter in the world, and it drinks
+ Dos Equis
+
+
...snip...
+
------------------ generated xml file: ..\..\testresults.xml -------------------
============== 3 failed, 2182 passed, 50 skipped in 10.84 seconds ==============
```

The problem appears to just have something to do with newlines, but I haven't looked much at it beyond that.