Skip to content

Instantly share code, notes, and snippets.

@bsipocz
Last active November 24, 2015 23:06
Show Gist options
  • Save bsipocz/9cd34e75f0cbb4f4ad15 to your computer and use it in GitHub Desktop.
Save bsipocz/9cd34e75f0cbb4f4ad15 to your computer and use it in GitHub Desktop.
1.1rc1 python3.4 numpy 1.9.2 Ubuntu 14.04 remote_data
>>> astropy.test(remote_data=True)
======================================================================================================= test session starts =======================================================================================================
platform linux -- Python 3.4.3 -- py-1.4.30 -- pytest-2.7.3
rootdir: /home/gkovacs/.local/lib/python3.4/site-packages/astropy, inifile:
Running tests with Astropy version 1.1rc1.
Running tests in /home/gkovacs/.local/lib/python3.4/site-packages/astropy.
Date: 2015-11-24T22:24:57
Platform: Linux-3.16.0-53-generic-x86_64-with-Ubuntu-14.04-trusty
Executable: /usr/bin/python3
Full Python Version:
3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4]
encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15
Numpy: 1.8.2
Scipy: not available
Matplotlib: 1.3.1
h5py: not available
Using Astropy options: remote_data.
collected 7049 items / 2 errors
.local/lib/python3.4/site-packages/astropy/_erfa/tests/test_erfa.py .....
.local/lib/python3.4/site-packages/astropy/analytic_functions/tests/test_blackbody.py s....
.local/lib/python3.4/site-packages/astropy/config/tests/test_configs.py .................
.local/lib/python3.4/site-packages/astropy/constants/tests/test_constant.py ........
.local/lib/python3.4/site-packages/astropy/constants/tests/test_pickle.py sss
.local/lib/python3.4/site-packages/astropy/convolution/tests/test_convolve.py ...............................................................................................................
.local/lib/python3.4/site-packages/astropy/convolution/tests/test_convolve_fft.py ...................................................................................................................................................................................................................................................................................................................................................
.local/lib/python3.4/site-packages/astropy/convolution/tests/test_convolve_kernels.py ..............................................................................
.local/lib/python3.4/site-packages/astropy/convolution/tests/test_discretize.py ...s...........s........ss.....
.local/lib/python3.4/site-packages/astropy/convolution/tests/test_kernel_class.py ssssssss................................ssss....................................ssss................................................................................ssss................
.local/lib/python3.4/site-packages/astropy/convolution/tests/test_pickle.py .xx.xx.xx
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_angles.py ........................................
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_angular_separation.py ....
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_api_ape5.py .....
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_arrays.py .............
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_celestial_transformations.py ..........
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_distance.py .s.......
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_earth.py .............
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_formatting.py ..........
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_frames.py ......................F.
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_funcs.py ...
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_iau_fullstack.py ....................................................
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_intermediate_transformations.py ...................................................
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_matching.py ssssss
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_name_resolve.py F..
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_pickle.py ..sss
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_regression.py ....s..
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_representation.py .............................................................................
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_sites.py .......
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_sky_coord.py ........................................................................................................................................................................................................................................................................................................................................................................................x.......s.........
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_transformations.py ......
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_unit_representation.py .
.local/lib/python3.4/site-packages/astropy/coordinates/tests/accuracy/test_altaz_icrs.py ...x
.local/lib/python3.4/site-packages/astropy/coordinates/tests/accuracy/test_ecliptic.py ...
.local/lib/python3.4/site-packages/astropy/coordinates/tests/accuracy/test_fk4_no_e_fk4.py .
.local/lib/python3.4/site-packages/astropy/coordinates/tests/accuracy/test_fk4_no_e_fk5.py .
.local/lib/python3.4/site-packages/astropy/coordinates/tests/accuracy/test_galactic_fk4.py .
.local/lib/python3.4/site-packages/astropy/coordinates/tests/accuracy/test_icrs_fk5.py .
.local/lib/python3.4/site-packages/astropy/cosmology/tests/test_cosmology.py ..sss..s.ssssssss.ssssss.ssssssssssss
.local/lib/python3.4/site-packages/astropy/cosmology/tests/test_pickle.py sss
.local/lib/python3.4/site-packages/astropy/io/ascii/tests/test_c_reader.py ...........................x..................x.......x.x.................
.local/lib/python3.4/site-packages/astropy/io/ascii/tests/test_cds_header_from_readme.py ...
.local/lib/python3.4/site-packages/astropy/io/ascii/tests/test_compressed.py .......
.local/lib/python3.4/site-packages/astropy/io/ascii/tests/test_connect.py .............ss........
.local/lib/python3.4/site-packages/astropy/io/ascii/tests/test_ecsv.py sssssss
.local/lib/python3.4/site-packages/astropy/io/ascii/tests/test_fixedwidth.py ...............................
.local/lib/python3.4/site-packages/astropy/io/ascii/tests/test_html.py s.ssssss.ssss..s
.local/lib/python3.4/site-packages/astropy/io/ascii/tests/test_ipac_definitions.py ....................
.local/lib/python3.4/site-packages/astropy/io/ascii/tests/test_read.py .........................................................................................................
.local/lib/python3.4/site-packages/astropy/io/ascii/tests/test_types.py ...
.local/lib/python3.4/site-packages/astropy/io/ascii/tests/test_write.py ...............
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_checksum.py .....................
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_connect.py ..........................
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_core.py .................................................ss..........
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_diff.py ...................................
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_division.py .....
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_groups.py ........
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_hdulist.py .........................................
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_header.py ................................................................................................................................................
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_image.py ......................................................
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_nonstandard.py ...
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_structured.py .
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_table.py .......................................................................
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_uint.py ........
.local/lib/python3.4/site-packages/astropy/io/fits/tests/test_util.py .
.local/lib/python3.4/site-packages/astropy/io/misc/tests/test_hdf5.py sssssssssssssssssssssssssssssssssssssssss
.local/lib/python3.4/site-packages/astropy/io/misc/tests/test_pickle_helpers.py ....
.local/lib/python3.4/site-packages/astropy/io/tests/test_registry.py ..............................
.local/lib/python3.4/site-packages/astropy/io/votable/tests/converter_test.py ......................
.local/lib/python3.4/site-packages/astropy/io/votable/tests/exception_test.py ..
.local/lib/python3.4/site-packages/astropy/io/votable/tests/table_test.py ........
.local/lib/python3.4/site-packages/astropy/io/votable/tests/tree_test.py ...
.local/lib/python3.4/site-packages/astropy/io/votable/tests/ucd_test.py .....
.local/lib/python3.4/site-packages/astropy/io/votable/tests/util_test.py ...........
.local/lib/python3.4/site-packages/astropy/io/votable/tests/vo_test.py .........................................................................................................................................................................
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_compound.py ..........................................FF........s
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_constraints.py ssssssss...........ss
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_core.py .............
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_fitters.py ..s..sss...ssssssss
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_functional_models.py ..........s
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_input.py ...............ssss...................................
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_mappings.py ......
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_models.py .........s.......
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_parameters.py ....................................................
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_polynomial.py sssssssssssssssssssssssssssss.........
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_projections.py .......................................................................................
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_rotations.py .............
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_utils.py ...
.local/lib/python3.4/site-packages/astropy/nddata/mixins/tests/test_ndarithmetic.py ........................................................
.local/lib/python3.4/site-packages/astropy/nddata/mixins/tests/test_ndio.py .
.local/lib/python3.4/site-packages/astropy/nddata/tests/test_compat.py ................
.local/lib/python3.4/site-packages/astropy/nddata/tests/test_decorators.py ..........
.local/lib/python3.4/site-packages/astropy/nddata/tests/test_flag_collection.py ..........
.local/lib/python3.4/site-packages/astropy/nddata/tests/test_nddata.py ..................................
.local/lib/python3.4/site-packages/astropy/nddata/tests/test_nddata_base.py .
.local/lib/python3.4/site-packages/astropy/nddata/tests/test_utils.py ....................ssssssssssssss..............
.local/lib/python3.4/site-packages/astropy/stats/tests/test_bayesian_blocks.py .......
.local/lib/python3.4/site-packages/astropy/stats/tests/test_funcs.py .....ss.......ssss.s..sssssssssss
.local/lib/python3.4/site-packages/astropy/stats/tests/test_histogram.py ..ss..s..
.local/lib/python3.4/site-packages/astropy/stats/tests/test_sigma_clipping.py .s...
.local/lib/python3.4/site-packages/astropy/table/tests/test_array.py ...
.local/lib/python3.4/site-packages/astropy/table/tests/test_bst.py .......
.local/lib/python3.4/site-packages/astropy/table/tests/test_column.py ...................................................................................
.local/lib/python3.4/site-packages/astropy/table/tests/test_groups.py ......................................
.local/lib/python3.4/site-packages/astropy/table/tests/test_index.py ................................................................................................................................................................................................................................................................................................................................................................................................................................................
.local/lib/python3.4/site-packages/astropy/table/tests/test_info.py ............
.local/lib/python3.4/site-packages/astropy/table/tests/test_init_table.py ...................................................................................................................................................
.local/lib/python3.4/site-packages/astropy/table/tests/test_item_access.py ..............................
.local/lib/python3.4/site-packages/astropy/table/tests/test_jsviewer.py ...
.local/lib/python3.4/site-packages/astropy/table/tests/test_masked.py ..................................
.local/lib/python3.4/site-packages/astropy/table/tests/test_mixin.py ..............................................................x....
.local/lib/python3.4/site-packages/astropy/table/tests/test_np_utils.py .
.local/lib/python3.4/site-packages/astropy/table/tests/test_operations.py ......................................
.local/lib/python3.4/site-packages/astropy/table/tests/test_pickle.py ...............
.local/lib/python3.4/site-packages/astropy/table/tests/test_pprint.py ........................................................
.local/lib/python3.4/site-packages/astropy/table/tests/test_row.py ..................................
.local/lib/python3.4/site-packages/astropy/table/tests/test_subclass.py ..
.local/lib/python3.4/site-packages/astropy/table/tests/test_table.py ................................................................................................................................................................................................................................................................................................x...........................ssss.........
.local/lib/python3.4/site-packages/astropy/tests/test_logger.py .............................
.local/lib/python3.4/site-packages/astropy/tests/tests/test_imports.py ..
.local/lib/python3.4/site-packages/astropy/tests/tests/test_open_file_detection.py .
.local/lib/python3.4/site-packages/astropy/tests/tests/test_quantity_helpers.py .
.local/lib/python3.4/site-packages/astropy/tests/tests/test_run_tests.py ....
.local/lib/python3.4/site-packages/astropy/tests/tests/test_skip_remote_data.py .
.local/lib/python3.4/site-packages/astropy/tests/tests/test_socketblocker.py ....
.local/lib/python3.4/site-packages/astropy/time/tests/test_basic.py .......................................................
.local/lib/python3.4/site-packages/astropy/time/tests/test_comparisons.py ...
.local/lib/python3.4/site-packages/astropy/time/tests/test_delta.py .................................................................................
.local/lib/python3.4/site-packages/astropy/time/tests/test_guess.py ....
.local/lib/python3.4/site-packages/astropy/time/tests/test_methods.py ..........ss.......
.local/lib/python3.4/site-packages/astropy/time/tests/test_pickle.py .
.local/lib/python3.4/site-packages/astropy/time/tests/test_precision.py .......x..
.local/lib/python3.4/site-packages/astropy/time/tests/test_quantity_interaction.py ...............
.local/lib/python3.4/site-packages/astropy/time/tests/test_sidereal.py ...................
.local/lib/python3.4/site-packages/astropy/time/tests/test_ut1.py ...s
.local/lib/python3.4/site-packages/astropy/units/tests/test_equivalencies.py .....................................................
.local/lib/python3.4/site-packages/astropy/units/tests/test_format.py .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
.local/lib/python3.4/site-packages/astropy/units/tests/test_logarithmic.py .s...ss.s...s................ss.............................................................
.local/lib/python3.4/site-packages/astropy/units/tests/test_physical.py ...........
.local/lib/python3.4/site-packages/astropy/units/tests/test_quantity.py ......................................................................
.local/lib/python3.4/site-packages/astropy/units/tests/test_quantity_array_methods.py ..............x..............x............x.x.............
.local/lib/python3.4/site-packages/astropy/units/tests/test_quantity_decorator.py ............................
.local/lib/python3.4/site-packages/astropy/units/tests/test_quantity_non_ufuncs.py xx
.local/lib/python3.4/site-packages/astropy/units/tests/test_quantity_ufuncs.py ....................................ss....................................................................................................................
.local/lib/python3.4/site-packages/astropy/units/tests/test_units.py ............................................................................................................................................................................................................................................................................................................................................................................................................................................
.local/lib/python3.4/site-packages/astropy/utils/compat/numpy/tests/test_broadcast_arrays.py ....
.local/lib/python3.4/site-packages/astropy/utils/iers/tests/test_iers.py ....s
.local/lib/python3.4/site-packages/astropy/utils/tests/test_codegen.py .
.local/lib/python3.4/site-packages/astropy/utils/tests/test_collections.py .....
.local/lib/python3.4/site-packages/astropy/utils/tests/test_compat.py .
.local/lib/python3.4/site-packages/astropy/utils/tests/test_console.py .......s.................
.local/lib/python3.4/site-packages/astropy/utils/tests/test_data.py ..........................
.local/lib/python3.4/site-packages/astropy/utils/tests/test_data_info.py .............
.local/lib/python3.4/site-packages/astropy/utils/tests/test_decorators.py ........s..
.local/lib/python3.4/site-packages/astropy/utils/tests/test_gzip.py ..
.local/lib/python3.4/site-packages/astropy/utils/tests/test_introspection.py ....
.local/lib/python3.4/site-packages/astropy/utils/tests/test_metadata.py ...............
.local/lib/python3.4/site-packages/astropy/utils/tests/test_misc.py .....
.local/lib/python3.4/site-packages/astropy/utils/tests/test_odict.py sssssssssssssssssssssssssssssssssssssssssss
.local/lib/python3.4/site-packages/astropy/utils/tests/test_state.py F.
.local/lib/python3.4/site-packages/astropy/utils/tests/test_timer.py .
.local/lib/python3.4/site-packages/astropy/utils/tests/test_xml.py ........
.local/lib/python3.4/site-packages/astropy/visualization/scripts/tests/test_fits2bitmap.py ..
.local/lib/python3.4/site-packages/astropy/visualization/tests/test_histogram.py ..F
.local/lib/python3.4/site-packages/astropy/visualization/tests/test_interval.py .................
.local/lib/python3.4/site-packages/astropy/visualization/tests/test_norm.py s......
.local/lib/python3.4/site-packages/astropy/visualization/tests/test_stretch.py ...................................................................................................
.local/lib/python3.4/site-packages/astropy/visualization/tests/test_ui.py ......
.local/lib/python3.4/site-packages/astropy/visualization/tests/test_units.py F.
.local/lib/python3.4/site-packages/astropy/vo/client/tests/test_conesearch.py ......x.....F....x.
.local/lib/python3.4/site-packages/astropy/vo/client/tests/test_vos_catalog.py ...............
.local/lib/python3.4/site-packages/astropy/vo/samp/tests/test_client.py ....
.local/lib/python3.4/site-packages/astropy/vo/samp/tests/test_errors.py ...
.local/lib/python3.4/site-packages/astropy/vo/samp/tests/test_hub.py ..
.local/lib/python3.4/site-packages/astropy/vo/samp/tests/test_hub_proxy.py .....
.local/lib/python3.4/site-packages/astropy/vo/samp/tests/test_hub_script.py .
.local/lib/python3.4/site-packages/astropy/vo/samp/tests/test_standard_profile.py ...
.local/lib/python3.4/site-packages/astropy/vo/samp/tests/test_web_profile.py ..
.local/lib/python3.4/site-packages/astropy/vo/validator/tests/test_inpect.py ....
.local/lib/python3.4/site-packages/astropy/vo/validator/tests/test_validate.py ....
.local/lib/python3.4/site-packages/astropy/wcs/tests/test_pickle.py ......
.local/lib/python3.4/site-packages/astropy/wcs/tests/test_profiling.py ..................................
.local/lib/python3.4/site-packages/astropy/wcs/tests/test_utils.py .........................................
.local/lib/python3.4/site-packages/astropy/wcs/tests/test_wcs.py ..........................................................................
.local/lib/python3.4/site-packages/astropy/wcs/tests/test_wcsprm.py ....................................................................................................x......XX..
.local/lib/python3.4/site-packages/astropy/wcs/tests/extension/test_extension.py .
============================================================================================================= ERRORS ==============================================================================================================
_________________________________________________________________________________________ ERROR collecting modeling/tests/test_models.py __________________________________________________________________________________________
_pytest.runner:149: in __init__
???
_pytest.main:437: in _memocollect
???
_pytest.main:314: in _memoizedcall
???
_pytest.main:437: in <lambda>
???
_pytest.python:573: in collect
???
_pytest.python:365: in collect
???
_pytest.python:377: in makeitem
???
_pytest.core:521: in __call__
???
_pytest.core:528: in _docall
???
_pytest.core:393: in execute
???
_pytest.core:109: in wrapped_call
???
_pytest.python:255: in pytest_pycollect_makeitem
???
_pytest.python:394: in _genfunctions
???
_pytest.core:524: in callextra
???
_pytest.core:528: in _docall
???
_pytest.core:394: in execute
???
_pytest.python:164: in pytest_generate_tests
???
_pytest.python:879: in parametrize
???
_pytest.python:752: in setmulti
???
_pytest.python:735: in _checkargnotcontained
???
E ValueError: duplicate 'model_class'
_________________________________________________________________________________________ ERROR collecting modeling/tests/test_models.py __________________________________________________________________________________________
_pytest.runner:149: in __init__
???
_pytest.main:437: in _memocollect
???
_pytest.main:314: in _memoizedcall
???
_pytest.main:437: in <lambda>
???
_pytest.python:573: in collect
???
_pytest.python:365: in collect
???
_pytest.python:377: in makeitem
???
_pytest.core:521: in __call__
???
_pytest.core:528: in _docall
???
_pytest.core:393: in execute
???
_pytest.core:109: in wrapped_call
???
_pytest.python:255: in pytest_pycollect_makeitem
???
_pytest.python:394: in _genfunctions
???
_pytest.core:524: in callextra
???
_pytest.core:528: in _docall
???
_pytest.core:394: in execute
???
_pytest.python:164: in pytest_generate_tests
???
_pytest.python:879: in parametrize
???
_pytest.python:752: in setmulti
???
_pytest.python:735: in _checkargnotcontained
???
E ValueError: duplicate 'model_class'
============================================================================================================ FAILURES =============================================================================================================
__________________________________________________________________________________________________ test_representation_subclass ___________________________________________________________________________________________________
def test_representation_subclass():
# Regression test for #3354
from ..builtin_frames import FK5
# Normally when instantiating a frame without a distance the frame will try
# and use UnitSphericalRepresentation internally instead of
# SphericalRepresentation.
frame = FK5(representation=representation.SphericalRepresentation, ra=32 * u.deg, dec=20 * u.deg)
assert type(frame._data) == representation.UnitSphericalRepresentation
assert frame.representation == representation.SphericalRepresentation
# If using a SphericalRepresentation class this used to not work, so we
# test here that this is now fixed.
> class NewSphericalRepresentation(representation.SphericalRepresentation):
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_frames.py:630:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'astropy.coordinates.tests.test_frames.test_representation_subclass.<locals>.NewSphericalRepresentation'>, name = 'NewSphericalRepresentation'
bases = (<class 'astropy.coordinates.representation.SphericalRepresentation'>,)
dct = {'__module__': 'astropy.coordinates.tests.test_frames', '__qualname__': 'test_representation_subclass.<locals>.NewSphe...'>), ('lat', <class 'astropy.coordinates.angles.Latitude'>), ('distance', <class 'astropy.units.quantity.Quantity'>)])}
def __init__(cls, name, bases, dct):
super(MetaBaseRepresentation, cls).__init__(name, bases, dct)
if name != 'BaseRepresentation' and 'attr_classes' not in dct:
raise NotImplementedError('Representations must have an '
'"attr_classes" class attribute.')
# Register representation name (except for BaseRepresentation)
if cls.__name__ == 'BaseRepresentation':
return
repr_name = cls.get_name()
if repr_name in REPRESENTATION_CLASSES:
> raise ValueError("Representation class {0} already defined".format(repr_name))
E ValueError: Representation class newspherical already defined
.local/lib/python3.4/site-packages/astropy/coordinates/representation.py:48: ValueError
___________________________________________________________________________________________________________ test_names ____________________________________________________________________________________________________________
@remote_data
def test_names():
# First check that sesame is up
if urllib.request.urlopen("http://cdsweb.u-strasbg.fr/cgi-bin/nph-sesame").getcode() != 200:
pytest.skip("SESAME appears to be down, skipping test_name_resolve.py:test_names()...")
with pytest.raises(NameResolveError):
get_icrs_coordinates("m87h34hhh")
try:
icrs = get_icrs_coordinates("ngc 3642")
except NameResolveError:
ra, dec = _parse_response(_cached_ngc3642["all"])
icrs = SkyCoord(ra=float(ra)*u.degree, dec=float(dec)*u.degree)
icrs_true = SkyCoord(ra="11h 22m 18.014s", dec="59d 04m 27.27s")
np.testing.assert_almost_equal(icrs.ra.degree, icrs_true.ra.degree, 3)
np.testing.assert_almost_equal(icrs.dec.degree, icrs_true.dec.degree, 3)
try:
icrs = get_icrs_coordinates("castor")
except NameResolveError:
ra,dec = _parse_response(_cached_castor["all"])
icrs = SkyCoord(ra=float(ra)*u.degree, dec=float(dec)*u.degree)
icrs_true = SkyCoord(ra="07h 34m 35.87s", dec="+31d 53m 17.8s")
> np.testing.assert_almost_equal(icrs.ra.degree, icrs_true.ra.degree, 3)
.local/lib/python3.4/site-packages/astropy/coordinates/tests/test_name_resolve.py:136:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
actual = 113.6566, desired = 113.64945833333331, decimal = 3, err_msg = '', verbose = True
def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True):
"""
Raise an assertion if two items are not equal up to desired precision.
.. note:: It is recommended to use one of `assert_allclose`,
`assert_array_almost_equal_nulp` or `assert_array_max_ulp`
instead of this function for more consistent floating point
comparisons.
The test is equivalent to ``abs(desired-actual) < 0.5 * 10**(-decimal)``.
Given two objects (numbers or ndarrays), check that all elements of these
objects are almost equal. An exception is raised at conflicting values.
For ndarrays this delegates to assert_array_almost_equal
Parameters
----------
actual : array_like
The object to check.
desired : array_like
The expected object.
decimal : int, optional
Desired precision, default is 7.
err_msg : str, optional
The error message to be printed in case of failure.
verbose : bool, optional
If True, the conflicting values are appended to the error message.
Raises
------
AssertionError
If actual and desired are not equal up to specified precision.
See Also
--------
assert_allclose: Compare two array_like objects for equality with desired
relative and/or absolute precision.
assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal
Examples
--------
>>> import numpy.testing as npt
>>> npt.assert_almost_equal(2.3333333333333, 2.33333334)
>>> npt.assert_almost_equal(2.3333333333333, 2.33333334, decimal=10)
...
<type 'exceptions.AssertionError'>:
Items are not equal:
ACTUAL: 2.3333333333333002
DESIRED: 2.3333333399999998
>>> npt.assert_almost_equal(np.array([1.0,2.3333333333333]),
... np.array([1.0,2.33333334]), decimal=9)
...
<type 'exceptions.AssertionError'>:
Arrays are not almost equal
<BLANKLINE>
(mismatch 50.0%)
x: array([ 1. , 2.33333333])
y: array([ 1. , 2.33333334])
"""
from numpy.core import ndarray
from numpy.lib import iscomplexobj, real, imag
# Handle complex numbers: separate into real/imag to handle
# nan/inf/negative zero correctly
# XXX: catch ValueError for subclasses of ndarray where iscomplex fail
try:
usecomplex = iscomplexobj(actual) or iscomplexobj(desired)
except ValueError:
usecomplex = False
msg = build_err_msg([actual, desired], err_msg, verbose=verbose,
header=('Arrays are not almost equal to %d decimals' % decimal))
if usecomplex:
if iscomplexobj(actual):
actualr = real(actual)
actuali = imag(actual)
else:
actualr = actual
actuali = 0
if iscomplexobj(desired):
desiredr = real(desired)
desiredi = imag(desired)
else:
desiredr = desired
desiredi = 0
try:
assert_almost_equal(actualr, desiredr, decimal=decimal)
assert_almost_equal(actuali, desiredi, decimal=decimal)
except AssertionError:
raise AssertionError(msg)
if isinstance(actual, (ndarray, tuple, list)) \
or isinstance(desired, (ndarray, tuple, list)):
return assert_array_almost_equal(actual, desired, decimal, err_msg)
try:
# If one of desired/actual is not finite, handle it specially here:
# check that both are nan if any is a nan, and test for equality
# otherwise
if not (gisfinite(desired) and gisfinite(actual)):
if gisnan(desired) or gisnan(actual):
if not (gisnan(desired) and gisnan(actual)):
raise AssertionError(msg)
else:
if not desired == actual:
raise AssertionError(msg)
return
except (NotImplementedError, TypeError):
pass
if round(abs(desired - actual), decimal) != 0 :
> raise AssertionError(msg)
E AssertionError:
E Arrays are not almost equal to 3 decimals
E ACTUAL: 113.6566
E DESIRED: 113.64945833333331
/usr/lib/python3/dist-packages/numpy/testing/utils.py:470: AssertionError
________________________________________________________________________________________________ test_inherit_constraints[model0] _________________________________________________________________________________________________
model = <CompoundModel11(amplitude_0=1.0, mean_0=0.0, stddev_0=1.0, amplitude_1=1.0, mean_1=0.0, stddev_1=1.0)>
@pytest.mark.parametrize('model',
[Gaussian1D(bounds={'stddev': (0, 0.3)}, fixed={'mean': True}) +
Gaussian1D(fixed={'mean': True}),
(_ConstraintsTestA + _ConstraintsTestB)()])
def test_inherit_constraints(model):
"""
Various tests for copying of constraint values between compound models and
their members.
There are two versions of this test: One where a compound model is created
from two model instances, and another where a compound model is created
from two model classes that have default constraints set on some of their
parameters.
Regression test for https://github.com/astropy/astropy/issues/3481
"""
# Lots of assertions in this test as there are multiple interfaces to
# parameter constraints
assert 'stddev_0' in model.bounds
> assert model.bounds['stddev_0'] == (0, 0.3)
E assert (0.1, 0.5) == (0, 0.3)
E At index 0 diff: 0.1 != 0
E Use -v to get the full diff
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_compound.py:759: AssertionError
________________________________________________________________________________________________ test_inherit_constraints[model1] _________________________________________________________________________________________________
model = <CompoundModel12(stddev_0=0.0, mean_0=0.0, mean_1=0.0)>
@pytest.mark.parametrize('model',
[Gaussian1D(bounds={'stddev': (0, 0.3)}, fixed={'mean': True}) +
Gaussian1D(fixed={'mean': True}),
(_ConstraintsTestA + _ConstraintsTestB)()])
def test_inherit_constraints(model):
"""
Various tests for copying of constraint values between compound models and
their members.
There are two versions of this test: One where a compound model is created
from two model instances, and another where a compound model is created
from two model classes that have default constraints set on some of their
parameters.
Regression test for https://github.com/astropy/astropy/issues/3481
"""
# Lots of assertions in this test as there are multiple interfaces to
# parameter constraints
assert 'stddev_0' in model.bounds
> assert model.bounds['stddev_0'] == (0, 0.3)
E assert (0.1, 0.5) == (0, 0.3)
E At index 0 diff: 0.1 != 0
E Use -v to get the full diff
.local/lib/python3.4/site-packages/astropy/modeling/tests/test_compound.py:759: AssertionError
___________________________________________________________________________________________________________ test_alias ____________________________________________________________________________________________________________
def test_alias():
from ...cosmology import core, WMAP9, WMAP7
# REMOVE in astropy 0.5
with catch_warnings() as w:
x = core.DEFAULT_COSMOLOGY()
> assert x == WMAP9
E assert FlatLambdaCDM(name="WMAP7", H0=70.4 km / (Mpc s), Om0=0.272, Tcmb0=2.725 K, Neff=3.04, m_nu=[ 0. 0. 0.] eV, Ob0=0.0455) == FlatLambdaCDM(name="WMAP9", H0=69.3 km / (Mpc s), Om0=0.286, Tcmb0=2.725 K, Neff=3.04, m_nu=[ 0. 0. 0.] eV, Ob0=0.0463)
.local/lib/python3.4/site-packages/astropy/utils/tests/test_state.py:16: AssertionError
________________________________________________________________________________________________________ test_hist_autobin ________________________________________________________________________________________________________
rseed = 0
@pytest.mark.skipif('not HAS_PLT')
def test_hist_autobin(rseed=0):
rng = np.random.RandomState(rseed)
x = rng.randn(100)
for bintype in [10, np.arange(-3, 3, 10),
'knuth', 'scott', 'freedman', 'blocks']:
for range in [None, (-3, 3)]:
> n1, bins1 = histogram(x, bintype, range=range)
.local/lib/python3.4/site-packages/astropy/visualization/tests/test_histogram.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.local/lib/python3.4/site-packages/astropy/stats/histogram.py:84: in histogram
da, bins = knuth_bin_width(a, True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data = array([ 1.76405235, 0.40015721, 0.97873798, 2.2408932 , 1.86755799,
-0.97727788, 0.95008842, -0.15135721, ...244507, 0.20827498, 0.97663904, 0.3563664 ,
0.70657317, 0.01050002, 1.78587049, 0.12691209, 0.40198936])
return_bins = True, quiet = True
def knuth_bin_width(data, return_bins=False, quiet=True):
r"""Return the optimal histogram bin width using Knuth's rule.
Knuth's rule is a fixed-width, Bayesian approach to determining
the optimal bin width of a histogram.
Parameters
----------
data : array-like, ndim=1
observed (one-dimensional) data
return_bins : bool (optional)
if True, then return the bin edges
quiet : bool (optional)
if True (default) then suppress stdout output from scipy.optimize
Returns
-------
dx : float
optimal bin width. Bins are measured starting at the first data point.
bins : ndarray
bin edges: returned if ``return_bins`` is True
Notes
-----
The optimal number of bins is the value M which maximizes the function
.. math::
F(M|x,I) = n\log(M) + \log\Gamma(\frac{M}{2})
- M\log\Gamma(\frac{1}{2})
- \log\Gamma(\frac{2n+M}{2})
+ \sum_{k=1}^M \log\Gamma(n_k + \frac{1}{2})
where :math:`\Gamma` is the Gamma function, :math:`n` is the number of
data points, :math:`n_k` is the number of measurements in bin :math:`k`
[1]_.
References
----------
.. [1] Knuth, K.H. "Optimal Data-Based Binning for Histograms".
arXiv:0605197, 2006
See Also
--------
freedman_bin_width
scott_bin_width
bayesian_blocks
histogram
"""
# import here because of optional scipy dependency
> from scipy import optimize
E ImportError: No module named 'scipy'
.local/lib/python3.4/site-packages/astropy/stats/histogram.py:270: ImportError
___________________________________________________________________________________________________________ test_units ____________________________________________________________________________________________________________
@pytest.mark.skipif('not HAS_PLT')
def test_units():
plt.figure()
with quantity_support():
buff = io.BytesIO()
plt.plot([1, 2, 3] * u.m, [3, 4, 5] * u.kg)
plt.plot([105, 210, 315] * u.cm, [3050, 3025, 3010] * u.g)
> plt.savefig(buff, format='svg')
.local/lib/python3.4/site-packages/astropy/visualization/tests/test_units.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/matplotlib/pyplot.py:561: in savefig
return fig.savefig(*args, **kwargs)
/usr/lib/python3/dist-packages/matplotlib/figure.py:1422: in savefig
self.canvas.print_figure(*args, **kwargs)
/usr/lib/python3/dist-packages/matplotlib/backend_bases.py:2220: in print_figure
**kwargs)
/usr/lib/python3/dist-packages/matplotlib/backend_bases.py:1978: in print_svg
return svg.print_svg(*args, **kwargs)
/usr/lib/python3/dist-packages/matplotlib/backends/backend_svg.py:1157: in print_svg
return self._print_svg(filename, svgwriter, fh_to_close, **kwargs)
/usr/lib/python3/dist-packages/matplotlib/backends/backend_svg.py:1185: in _print_svg
self.figure.draw(renderer)
/usr/lib/python3/dist-packages/matplotlib/artist.py:56: in draw_wrapper
draw(artist, renderer, *args, **kwargs)
/usr/lib/python3/dist-packages/matplotlib/figure.py:973: in draw
self.patch.draw(renderer)
/usr/lib/python3/dist-packages/matplotlib/artist.py:56: in draw_wrapper
draw(artist, renderer, *args, **kwargs)
/usr/lib/python3/dist-packages/matplotlib/patches.py:430: in draw
renderer.draw_path(gc, tpath, affine, rgbFace)
/usr/lib/python3/dist-packages/matplotlib/backends/backend_svg.py:545: in draw_path
attrib['style'] = self._get_style(gc, rgbFace)
/usr/lib/python3/dist-packages/matplotlib/backends/backend_svg.py:433: in _get_style
return generate_css(self._get_style_dict(gc, rgbFace))
/usr/lib/python3/dist-packages/matplotlib/backends/backend_svg.py:405: in _get_style_dict
attrib['fill'] = rgb2hex(rgbFace)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
rgb = (1.0, 1.0, 1.0, 1.0)
def rgb2hex(rgb):
'Given an rgb or rgba sequence of 0-1 floats, return the hex string'
> return '#%02x%02x%02x' % tuple([np.round(val * 255) for val in rgb[:3]])
E DeprecationWarning: automatic int conversions have been deprecated
/usr/lib/python3/dist-packages/matplotlib/colors.py:222: DeprecationWarning
_________________________________________________________________________________________ TestConeSearch.test_prediction[center1-radius1] _________________________________________________________________________________________
self = <astropy.vo.client.tests.test_conesearch.TestConeSearch object at 0x7fbf498cebe0>, center = <ICRS Coordinate: (ra, dec) in deg
(0.0, 0.0)>, radius = <Quantity 0.8 deg>
@pytest.mark.parametrize(('center', 'radius'),
[((SCS_RA, SCS_DEC), 0.8),
(SCS_CENTER, 0.8 * u.degree)])
def test_prediction(self, center, radius):
"""Prediction tests are not very accurate but will have to do."""
t_1, tab_1 = conesearch.conesearch_timer(
center, radius, catalog_db=self.url,
pedantic=self.pedantic, verbose=self.verbose)
n_1 = tab_1.array.size
t_2, n_2 = conesearch.predict_search(
self.url, center, radius,
pedantic=self.pedantic, verbose=self.verbose)
assert n_2 > 0 and n_2 <= n_1 * 1.5
> assert t_2 > 0 and t_2 <= t_1 * 1.5
E assert (0.7670762709341219 > 0 and 0.7670762709341219 <= (0.507880449295044 * 1.5))
.local/lib/python3.4/site-packages/astropy/vo/client/tests/test_conesearch.py:182: AssertionError
------------------------------------------------------------------------------------------------------ Captured stdout call -------------------------------------------------------------------------------------------------------
INFO: conesearch_timer took 0.507880449295044 s on AVERAGE for 1 call(s). [astropy.utils.timer]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment