Created
August 24, 2018 09:06
-
-
Save cdeil/f9a10e57884d28550a9a2e11769f94f3 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(iminuit-270) hfm-1804a:iminuit deil$ pypy3 -c 'import astropy; astropy.test()' | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/importlib/_bootstrap.py:223: UserWarning: builtins.type size changed, may indicate binary incompatibility. Expected 872, got 416 | |
return f(*args, **kwds) | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/importlib/_bootstrap.py:223: UserWarning: builtins.type size changed, may indicate binary incompatibility. Expected 872, got 416 | |
return f(*args, **kwds) | |
=========================================================================================== test session starts =========================================================================================== | |
platform darwin -- Python 3.5.3[pypy-6.0.0-final], pytest-3.7.2, py-1.5.4, pluggy-0.7.1 | |
Running tests with Astropy version 3.0.4. | |
Running tests in software/anaconda3/envs/iminuit-270/site-packages/astropy. | |
Date: 2018-08-24T10:57:43 | |
Platform: Darwin-17.7.0-x86_64-i386-64bit | |
Executable: /Users/deil/software/anaconda3/envs/iminuit-270/bin/pypy3 | |
Full Python Version: | |
3.5.3 (fdd60ed87e941677e8ea11acf9f1819466521bf2, Jun 20 2018, 15:26:30) | |
[PyPy 6.0.0 with GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] | |
encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8 | |
byteorder: little | |
float info: dig: 15, mant_dig: 15 | |
Numpy: 1.15.1 | |
Scipy: not available | |
Matplotlib: not available | |
h5py: not available | |
Pandas: not available | |
Cython: 0.28.5 | |
astropy_helpers: 3.0.2 | |
Using Astropy options: remote_data: none. | |
rootdir: /Users/deil, inifile: | |
plugins: remotedata-0.3.0, openfiles-0.3.0, doctestplus-0.1.3, arraydiff-0.2 | |
collected 10234 items / 16 skipped | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/_erfa/tests/test_erfa.py ....... [ 0%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/config/tests/test_configs.py ............... [ 0%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/constants/tests/test_constant.py ........ [ 0%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/constants/tests/test_pickle.py xxxxxxxxx [ 0%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/constants/tests/test_prior_version.py ......... [ 0%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/convolution/tests/test_convolve.py ............................................................................................. [ 1%] | |
...x.x.x.x.x.x.x.x...................................................................................................s [ 2%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/convolution/tests/test_convolve_fft.py ......................................................................................... [ 3%] | |
................................................................................................................................................................................................... [ 5%] | |
.............. [ 5%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/convolution/tests/test_convolve_kernels.py .............................................................................. [ 6%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/convolution/tests/test_convolve_models.py ssssss....ss [ 6%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/convolution/tests/test_convolve_nddata.py ... [ 6%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/convolution/tests/test_discretize.py ...s...........s........sss....... [ 6%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/convolution/tests/test_kernel_class.py ssssssss................................ssss....................................ssss..... [ 7%] | |
.........................................................................ssss............... [ 8%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/convolution/tests/test_pickle.py .xx.xx.xx [ 8%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_angles.py ......................................... [ 8%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_angular_separation.py .... [ 8%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_api_ape5.py ....s [ 9%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_arrays.py ............. [ 9%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_atc_replacements.py .... [ 9%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_celestial_transformations.py ............... [ 9%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_distance.py .s........ [ 9%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_earth.py ..............s.. [ 9%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_finite_difference_velocities.py .........xx [ 9%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_formatting.py .......... [ 9%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_frames.py ...................................... [ 10%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_frames_with_velocity.py .............................................. [ 10%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_funcs.py ... [ 10%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_iau_fullstack.py .................................................... [ 11%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_intermediate_transformations.py .........................................................s [ 11%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_matching.py ssssssssss [ 11%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_matrix_utilities.py .. [ 11%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_name_resolve.py sss [ 11%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_pickle.py ...xxx.x..xxx.x..xxx.x. [ 12%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_regression.py .....s............ss..s.... [ 12%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_representation.py ....................................................................................... [ 13%] | |
........ [ 13%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_representation_arithmetic.py ............................................................................ [ 14%] | |
............. [ 14%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_representation_methods.py ............ [ 14%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_shape_manipulation.py ......... [ 14%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_sites.py .ss.s.. [ 14%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_sky_coord.py ............................................................................................ [ 15%] | |
................................................................................................................................................................................................... [ 17%] | |
...........................................................................................x........s.......s......... [ 18%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_sky_coord_velocities.py .........xs......s...x.xs......s... [ 18%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_skyoffset_transformations.py ............................. [ 19%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_solar_system.py s....ssss..ssssssss....sss [ 19%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_transformations.py ............................. [ 19%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_unit_representation.py . [ 19%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/test_velocity_corrs.py ...... [ 19%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/accuracy/test_altaz_icrs.py ...x [ 19%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/accuracy/test_ecliptic.py ..... [ 19%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/accuracy/test_fk4_no_e_fk4.py . [ 19%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/accuracy/test_fk4_no_e_fk5.py . [ 19%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/accuracy/test_galactic_fk4.py . [ 19%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/coordinates/tests/accuracy/test_icrs_fk5.py . [ 19%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/cosmology/tests/test_cosmology.py ..sss..s.ssssssss.ssssss.ssssssssssssss [ 20%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/cosmology/tests/test_pickle.py ... [ 20%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py .................FFEEEEEEEEEE..............EEEEEEEEEEEEEEFEEEEEEEEEEEEEEE.F...FEEEEEEEsss.sFFFxF [ 21%] | |
.F. [ 21%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_cds_header_from_readme.py FFFF [ 21%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_compressed.py FFFFFFF [ 21%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_connect.py FFFFFEFFFF...ss........s [ 21%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_ecsv.py ssssssssssssssssssssssssssssssssssssss [ 21%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_fixedwidth.py ............................... [ 22%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_html.py s.ssssss.ssss...s.......s [ 22%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_ipac_definitions.py .................... [ 22%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_read.py .................................................................................................... [ 23%] | |
......................... [ 23%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_rst.py ......... [ 23%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_types.py ... [ 23%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_write.py ................................................................................... [ 24%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py FFFFFFFFFFFF.FF.F.FFF [ 24%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_compression_failures.py ..................................... [ 25%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_connect.py ...........F.F...............FF..sssssssssssssssssssssss..s [ 25%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_convenience.py F....FFF [ 25%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py ....F..F.............FF..F......s.......................F.FFF.FF........F. [ 26%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_diff.py ...............................F.......... [ 27%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_division.py ..... [ 27%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitscheck.py ..F..F [ 27%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py ..FFFFFFFF.FFF [ 27%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsheader.py ..... [ 27%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsinfo.py .. [ 27%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitstime.py ................... [ 27%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_groups.py F.FFFFF. [ 27%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py ..........................F.....F.FFFFFFFF....... [ 28%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_header.py .................F................................................................................. [ 29%] | |
.............F................................. [ 29%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py .......F...........FFF.FF.FFFFFF...FFFFFFFFFFFFs.FF..FFFFF........F..F.FFFFFF....F [ 30%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_nonstandard.py ... [ 30%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_structured.py F [ 30%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_table.py .FFFFFFFFF.F.F.FFF..FFF.....FFFFFFFFF...F.....F.FFF.FFFFF.FFFssFFFF.FFFFFF.F..F.......... [ 31%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_uint.py FFFFFFFF [ 31%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_util.py ...s..... [ 31%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/misc/tests/test_hdf5.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 32%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/misc/tests/test_pickle_helpers.py .... [ 32%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/misc/tests/test_yaml.py ssssssssssssssssssssssssssssss [ 32%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/tests/test_registry.py ................................... [ 32%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/votable/tests/converter_test.py ....................... [ 33%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/votable/tests/exception_test.py .. [ 33%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/votable/tests/resource_test.py . [ 33%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/votable/tests/table_test.py .......... [ 33%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/votable/tests/tree_test.py ... [ 33%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/votable/tests/ucd_test.py ..... [ 33%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/votable/tests/util_test.py ........... [ 33%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/votable/tests/vo_test.py .................................................................................................... [ 34%] | |
.......................................................F....... [ 34%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_blackbody.py ..ss.... [ 35%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_compound.py .............................................................s [ 35%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_constraints.py ssssssss...........ssss [ 35%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_core.py ............... [ 35%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_fitters.py ..s..ssss.........sssssssss....ss..sssssssssss [ 36%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_functional_models.py ...........s...ss [ 36%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_input.py ...............ssss................................... [ 37%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_mappings.py ......s [ 37%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_model_sets.py ....... [ 37%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_models.py s..........s................s..........s.s..sss.ssssssssssssssssssssssssssssssssssssssssss........ [ 38%] | |
s..s........s..s.s..sss.s.sssssssssssssssssssssssss....sss. [ 38%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_models_quantities.py .s.................s.s......s.................s.s......s.................s.s......s.... [ 39%] | |
.............s.s......s.................s.s.....sssssssssssssssssssssssssss [ 40%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_parameters.py ..................................................... [ 40%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_polynomial.py sssssssssssssssssssssssssssssssssssss.........s [ 41%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_projections.py ............................................................................................. [ 42%] | |
............................................... [ 42%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_quantities_evaluation.py .................... [ 42%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_quantities_fitting.py sssss [ 42%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_quantities_model.py .. [ 43%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_quantities_parameters.py ............. [ 43%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_quantities_rotations.py ............... [ 43%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_rotations.py ................... [ 43%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_separable.py .......... [ 43%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/modeling/tests/test_utils.py ... [ 43%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/nddata/mixins/tests/test_ndarithmetic.py ....................................................................................... [ 44%] | |
.......... [ 44%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/nddata/mixins/tests/test_ndio.py . [ 44%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/nddata/mixins/tests/test_ndslicing.py ........... [ 44%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/nddata/tests/test_ccddata.py ......FFFFFF..F..F...........................................FFFF.F......F....FFFF.F.. [ 45%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/nddata/tests/test_compat.py ................. [ 45%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/nddata/tests/test_decorators.py ............................ [ 45%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/nddata/tests/test_flag_collection.py .......... [ 46%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/nddata/tests/test_nddata.py .................................... [ 46%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/nddata/tests/test_nddata_base.py . [ 46%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/nddata/tests/test_nduncertainty.py .................... [ 46%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/nddata/tests/test_utils.py ..........................sssssssssssss................ [ 47%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/samp/tests/test_client.py .... [ 47%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/samp/tests/test_errors.py ... [ 47%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/samp/tests/test_hub.py ... [ 47%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/samp/tests/test_hub_proxy.py ..... [ 47%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/samp/tests/test_hub_script.py . [ 47%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/samp/tests/test_standard_profile.py . [ 47%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/samp/tests/test_web_profile.py .. [ 47%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/lombscargle/implementations/tests/test_mle.py ........................ [ 47%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/lombscargle/implementations/tests/test_utils.py ............................................. [ 47%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/lombscargle/tests/test_lombscargle.py .................................................................................... [ 48%] | |
................................................................................................................................................................................................... [ 50%] | |
................................................................................................................................................................................................... [ 52%] | |
................................................................................................................................................................................................... [ 54%] | |
......................................................................................................................................... [ 55%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/lombscargle/tests/test_statistics.py ............................ssFFssFFssFFssFFssFFssFFssFFssFFssFFssFFssFFssFFssFFssFFs [ 56%] | |
sFFssFFssFFssFFssFFssFFssFFssFFssFFssFFs.s..s.s..s.s..s.s..s.s..s.s..s.s..s.s..s.s..s.s.. [ 57%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/lombscargle/tests/test_utils.py ................ [ 57%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/tests/test_bayesian_blocks.py ....... [ 57%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/tests/test_biweight.py ................... [ 57%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/tests/test_circstats.py ..s....s. [ 58%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/tests/test_funcs.py .....ss..s.x.........ssss.s..sssssssssssssss.ssssssssssssssssssssssssssssssss [ 58%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/tests/test_histogram.py ..ss..s.. [ 58%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/tests/test_info_theory.py .... [ 58%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/tests/test_jackknife.py .ss [ 58%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/tests/test_sigma_clipping.py .s.......... [ 59%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/stats/tests/test_spatial.py ............ [ 59%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_array.py ... [ 59%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_bst.py EE.EEE. [ 59%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_column.py ..................................................................................................... [ 60%] | |
...... [ 60%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_groups.py ...................................... [ 60%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_index.py ...................................................................................................... [ 61%] | |
............................................................FF..........FF......................................................................................................................... [ 63%] | |
................................................ [ 64%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_info.py .............F [ 64%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_init_table.py ................................................................................................. [ 65%] | |
.......................................................... [ 65%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_item_access.py ...................................... [ 66%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_jsviewer.py .... [ 66%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_masked.py ................................... [ 66%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_mixin.py .....................................sss.s............................................................ [ 67%] | |
...... [ 67%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_np_utils.py . [ 67%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_operations.py .......x...x.x.x...........x.....x.......................x...x...x.........................x..... [ 68%] | |
........ [ 68%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_pickle.py .............................. [ 68%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_pprint.py .......................................................... [ 69%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_row.py ..................................... [ 69%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_showtable.py ............ [ 69%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_subclass.py .. [ 69%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_table.py ...................................................................................................... [ 70%] | |
................................................................................................................................................................................................... [ 72%] | |
.....................FFF......x........................ssss...............FFF.... [ 73%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/tests/test_logger.py ............x................ [ 73%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/tests/tests/test_imports.py s. [ 73%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/tests/tests/test_quantity_helpers.py . [ 73%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/tests/tests/test_run_tests.py .... [ 73%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/tests/tests/test_runner.py ...... [ 74%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/time/tests/test_basic.py ............................................s................. [ 74%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/time/tests/test_comparisons.py ... [ 74%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/time/tests/test_corrs.py ...s [ 74%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/time/tests/test_delta.py .................................................................................. [ 75%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/time/tests/test_guess.py .... [ 75%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/time/tests/test_methods.py ................................................. [ 76%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/time/tests/test_pickle.py . [ 76%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/time/tests/test_precision.py .......x.. [ 76%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/time/tests/test_quantity_interaction.py ................... [ 76%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/time/tests/test_sidereal.py ................... [ 76%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/time/tests/test_ut1.py s..ss [ 76%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_deprecated.py .. [ 76%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_equivalencies.py ............................................................ [ 77%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_format.py ..................................................................................................... [ 78%] | |
................................................................................................................................................................................................... [ 80%] | |
................................................................................................................................................................................................... [ 81%] | |
................................................................................................................................... [ 83%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_logarithmic.py ................................................................................................ [ 84%] | |
............................................................................................................. [ 85%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_physical.py ........... [ 85%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_quantity.py ..........................x...................................................ss. [ 86%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_quantity_annotations.py ........................... [ 86%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_quantity_array_methods.py ..........................................x................ [ 86%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_quantity_decorator.py ......................................................................................... [ 87%] | |
................................................................................................................................................................................................... [ 89%] | |
............................. [ 90%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_quantity_helpers.py .... [ 90%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_quantity_non_ufuncs.py xxxx [ 90%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_quantity_ufuncs.py sss......................................................................................... [ 91%] | |
........................................................................................... [ 91%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/units/tests/test_units.py ...................................................................................................... [ 92%] | |
........................................................................................................................................... [ 94%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/iers/tests/test_iers.py ....s...ss [ 94%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/tests/test_codegen.py . [ 94%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/tests/test_collections.py ......... [ 94%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/tests/test_console.py ............................ [ 94%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/tests/test_data.py ss.sssss...........s.....s.s.. [ 95%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/tests/test_data_info.py ............ [ 95%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/tests/test_decorators.py .......................... [ 95%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/tests/test_introspection.py .... [ 95%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/tests/test_metadata.py ................... [ 95%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/tests/test_misc.py ..s...... [ 95%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/tests/test_timer.py . [ 95%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/tests/test_xml.py ........s. [ 95%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/xml/tests/test_iterparse.py . [ 95%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/visualization/scripts/tests/test_fits2bitmap.py sssssss [ 95%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/visualization/tests/test_histogram.py sss [ 95%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/visualization/tests/test_interval.py ........................... [ 96%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/visualization/tests/test_lupton_rgb.py .........ss..s. [ 96%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/visualization/tests/test_norm.py .ssssssssssssssss [ 96%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/visualization/tests/test_stretch.py ............................................................................................ [ 97%] | |
....... [ 97%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/visualization/tests/test_units.py sss [ 97%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/wcs/tests/test_pickle.py ...... [ 97%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/wcs/tests/test_profiling.py .................................... [ 97%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/wcs/tests/test_utils.py ....F........................................ [ 98%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/wcs/tests/test_wcs.py .......................F......F.......................F. [ 98%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/wcs/tests/test_wcsprm.py ....................................................................................................F.. [ 99%] | |
........ [ 99%] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/wcs/tests/extension/test_extension.py . [100%] | |
================================================================================================= ERRORS ================================================================================================== | |
_________________________________________________________________________________ ERROR at setup of test_delimiter[True] __________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000112b3f7e0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000012196c840>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000112b3f7e0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_________________________________________________________________________________ ERROR at setup of test_delimiter[False] _________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000121f30960>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000119668200>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000121f30960>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_______________________________________________________________________________ ERROR at setup of test_include_names[True] ________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001206fb100>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000120acd9c0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001206fb100>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_______________________________________________________________________________ ERROR at setup of test_include_names[False] _______________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011455d040>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000125b41740>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011455d040>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_______________________________________________________________________________ ERROR at setup of test_exclude_names[True] ________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011e3fc9e0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000121e6f240>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011e3fc9e0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_______________________________________________________________________________ ERROR at setup of test_exclude_names[False] _______________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011d6275e0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000120c89600>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011d6275e0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
___________________________________________________________________________ ERROR at setup of test_include_exclude_names[True] ____________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011e85f740>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011fbf7420>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011e85f740>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
___________________________________________________________________________ ERROR at setup of test_include_exclude_names[False] ___________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000120c480a0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011f9752e0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000120c480a0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_______________________________________________________________________________ ERROR at setup of test_quoted_fields[True] ________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011ef2da00>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011e8237e0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011ef2da00>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_______________________________________________________________________________ ERROR at setup of test_quoted_fields[False] _______________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011f10f440>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000118e1f2e0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011f10f440>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
______________________________________________________________________________ ERROR at setup of test_not_enough_cols[True] _______________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000012c458da0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000012076dec0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000012c458da0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
______________________________________________________________________________ ERROR at setup of test_not_enough_cols[False] ______________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001165a3260>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000012127f1a0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001165a3260>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
__________________________________________________________________________________ ERROR at setup of test_data_end[True] __________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011f4e3760>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000012212a520>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011f4e3760>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_________________________________________________________________________________ ERROR at setup of test_data_end[False] __________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001168d95c0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000118c83a60>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001168d95c0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
__________________________________________________________________________________ ERROR at setup of test_inf_nan[True] ___________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011636edc0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000121d54a20>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011636edc0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
__________________________________________________________________________________ ERROR at setup of test_inf_nan[False] __________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000119fb0240>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011df59740>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000119fb0240>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
________________________________________________________________________________ ERROR at setup of test_fill_values[True] _________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000114a06ca0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000119d51880>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000114a06ca0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
________________________________________________________________________________ ERROR at setup of test_fill_values[False] ________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000012a6c9be0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000119ca2f20>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000012a6c9be0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_________________________________________________________________________ ERROR at setup of test_fill_include_exclude_names[True] _________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011e5e0d20>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011af27880>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011e5e0d20>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
________________________________________________________________________ ERROR at setup of test_fill_include_exclude_names[False] _________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000120f69860>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000012061be20>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000120f69860>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_________________________________________________________________________________ ERROR at setup of test_many_rows[True] __________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011fbf2f40>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011d809880>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011fbf2f40>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_________________________________________________________________________________ ERROR at setup of test_many_rows[False] _________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011e89c120>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011f1f1a60>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011e89c120>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
________________________________________________________________________________ ERROR at setup of test_many_columns[True] ________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000119801f60>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000012a768480>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000119801f60>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_______________________________________________________________________________ ERROR at setup of test_many_columns[False] ________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000120093b00>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011e61a2a0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000120093b00>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
__________________________________________________________________________________ ERROR at setup of test_read_tab[True] __________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000122101b40>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011fa134c0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000122101b40>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_________________________________________________________________________________ ERROR at setup of test_read_tab[False] __________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000012a75d880>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011a77d2e0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000012a75d880>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_____________________________________________________________________________ ERROR at setup of test_default_data_start[True] _____________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001217e7de0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000012250e160>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001217e7de0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
____________________________________________________________________________ ERROR at setup of test_default_data_start[False] _____________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000137a9dda0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000114ca62a0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000137a9dda0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
______________________________________________________________________________ ERROR at setup of test_commented_header[True] ______________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000137dbd640>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000115c4fe20>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000137dbd640>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_____________________________________________________________________________ ERROR at setup of test_commented_header[False] ______________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001380a38a0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000012aaed740>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001380a38a0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
____________________________________________________________________________________ ERROR at setup of test_rdb[True] _____________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001383ee8e0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011c10e520>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001383ee8e0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
____________________________________________________________________________________ ERROR at setup of test_rdb[False] ____________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001386f2d20>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000012a83c0c0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001386f2d20>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_________________________________________________________________________________ ERROR at setup of test_data_start[True] _________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001389e7ca0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000114801920>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001389e7ca0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
________________________________________________________________________________ ERROR at setup of test_data_start[False] _________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000138cf7380>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000120e154c0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000138cf7380>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
____________________________________________________________________________ ERROR at setup of test_quoted_empty_values[True] _____________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000013908e9a0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000114e2c840>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000013908e9a0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
____________________________________________________________________________ ERROR at setup of test_quoted_empty_values[False] ____________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000013935fa40>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011c0b6ca0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000013935fa40>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
____________________________________________________________________________ ERROR at setup of test_csv_comment_default[True] _____________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001396adc80>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011c052d40>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001396adc80>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
____________________________________________________________________________ ERROR at setup of test_csv_comment_default[False] ____________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001399779a0>, errno = 24 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011f957ba0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x00000001399779a0>, errno = 24 | |
> ??? | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_________________________________________________________________________ ERROR at setup of test_whitespace_before_comment[True] __________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000139cefca0>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
> return func(*args, **kwargs) | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011975cd40>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000139cefca0>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
return func(*args, **kwargs) | |
except self.Error: | |
raise | |
except (OSError, EnvironmentError): | |
cls, value, tb = sys.exc_info() | |
if not hasattr(value, 'errno'): | |
raise | |
__tracebackhide__ = False | |
errno = value.errno | |
try: | |
if not isinstance(value, WindowsError): | |
raise NameError | |
except NameError: | |
# we are not on Windows, or we got a proper OSError | |
cls = self._geterrnoclass(errno) | |
else: | |
try: | |
cls = self._geterrnoclass(_winerrnomap[errno]) | |
except KeyError: | |
raise value | |
> raise cls("%s%r" % (func.__name__, args)) | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_______________________________________________________________________________ ERROR at setup of test_line_endings[False] ________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011bac7d60>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
> return func(*args, **kwargs) | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011e76d1a0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011bac7d60>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
return func(*args, **kwargs) | |
except self.Error: | |
raise | |
except (OSError, EnvironmentError): | |
cls, value, tb = sys.exc_info() | |
if not hasattr(value, 'errno'): | |
raise | |
__tracebackhide__ = False | |
errno = value.errno | |
try: | |
if not isinstance(value, WindowsError): | |
raise NameError | |
except NameError: | |
# we are not on Windows, or we got a proper OSError | |
cls = self._geterrnoclass(errno) | |
else: | |
try: | |
cls = self._geterrnoclass(_winerrnomap[errno]) | |
except KeyError: | |
raise value | |
> raise cls("%s%r" % (func.__name__, args)) | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_______________________________________________________________________________ ERROR at setup of test_store_comments[True] _______________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000114ca4d80>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
> return func(*args, **kwargs) | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000125b41880>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000114ca4d80>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
return func(*args, **kwargs) | |
except self.Error: | |
raise | |
except (OSError, EnvironmentError): | |
cls, value, tb = sys.exc_info() | |
if not hasattr(value, 'errno'): | |
raise | |
__tracebackhide__ = False | |
errno = value.errno | |
try: | |
if not isinstance(value, WindowsError): | |
raise NameError | |
except NameError: | |
# we are not on Windows, or we got a proper OSError | |
cls = self._geterrnoclass(errno) | |
else: | |
try: | |
cls = self._geterrnoclass(_winerrnomap[errno]) | |
except KeyError: | |
raise value | |
> raise cls("%s%r" % (func.__name__, args)) | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
______________________________________________________________________________ ERROR at setup of test_store_comments[False] _______________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011dfadf80>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
> return func(*args, **kwargs) | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000120f3a7a0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011dfadf80>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
return func(*args, **kwargs) | |
except self.Error: | |
raise | |
except (OSError, EnvironmentError): | |
cls, value, tb = sys.exc_info() | |
if not hasattr(value, 'errno'): | |
raise | |
__tracebackhide__ = False | |
errno = value.errno | |
try: | |
if not isinstance(value, WindowsError): | |
raise NameError | |
except NameError: | |
# we are not on Windows, or we got a proper OSError | |
cls = self._geterrnoclass(errno) | |
else: | |
try: | |
cls = self._geterrnoclass(_winerrnomap[errno]) | |
except KeyError: | |
raise value | |
> raise cls("%s%r" % (func.__name__, args)) | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
________________________________________________________________________________ ERROR at setup of test_empty_quotes[True] ________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011ae8ffe0>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
> return func(*args, **kwargs) | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000120c519c0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011ae8ffe0>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
return func(*args, **kwargs) | |
except self.Error: | |
raise | |
except (OSError, EnvironmentError): | |
cls, value, tb = sys.exc_info() | |
if not hasattr(value, 'errno'): | |
raise | |
__tracebackhide__ = False | |
errno = value.errno | |
try: | |
if not isinstance(value, WindowsError): | |
raise NameError | |
except NameError: | |
# we are not on Windows, or we got a proper OSError | |
cls = self._geterrnoclass(errno) | |
else: | |
try: | |
cls = self._geterrnoclass(_winerrnomap[errno]) | |
except KeyError: | |
raise value | |
> raise cls("%s%r" % (func.__name__, args)) | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_______________________________________________________________________________ ERROR at setup of test_empty_quotes[False] ________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000116c875e0>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
> return func(*args, **kwargs) | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011fa1cc00>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x0000000116c875e0>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
return func(*args, **kwargs) | |
except self.Error: | |
raise | |
except (OSError, EnvironmentError): | |
cls, value, tb = sys.exc_info() | |
if not hasattr(value, 'errno'): | |
raise | |
__tracebackhide__ = False | |
errno = value.errno | |
try: | |
if not isinstance(value, WindowsError): | |
raise NameError | |
except NameError: | |
# we are not on Windows, or we got a proper OSError | |
cls = self._geterrnoclass(errno) | |
else: | |
try: | |
cls = self._geterrnoclass(_winerrnomap[errno]) | |
except KeyError: | |
raise value | |
> raise cls("%s%r" % (func.__name__, args)) | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
____________________________________________________________________________ ERROR at setup of test_fast_tab_with_names[True] _____________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000012c5ba240>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
> return func(*args, **kwargs) | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000011e822340>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000012c5ba240>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
return func(*args, **kwargs) | |
except self.Error: | |
raise | |
except (OSError, EnvironmentError): | |
cls, value, tb = sys.exc_info() | |
if not hasattr(value, 'errno'): | |
raise | |
__tracebackhide__ = False | |
errno = value.errno | |
try: | |
if not isinstance(value, WindowsError): | |
raise NameError | |
except NameError: | |
# we are not on Windows, or we got a proper OSError | |
cls = self._geterrnoclass(errno) | |
else: | |
try: | |
cls = self._geterrnoclass(_winerrnomap[errno]) | |
except KeyError: | |
raise value | |
> raise cls("%s%r" % (func.__name__, args)) | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
____________________________________________________________________________ ERROR at setup of test_fast_tab_with_names[False] ____________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011f394960>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
> return func(*args, **kwargs) | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x00000001163be8e0>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:878: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011f394960>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
return func(*args, **kwargs) | |
except self.Error: | |
raise | |
except (OSError, EnvironmentError): | |
cls, value, tb = sys.exc_info() | |
if not hasattr(value, 'errno'): | |
raise | |
__tracebackhide__ = False | |
errno = value.errno | |
try: | |
if not isinstance(value, WindowsError): | |
raise NameError | |
except NameError: | |
# we are not on Windows, or we got a proper OSError | |
cls = self._geterrnoclass(errno) | |
else: | |
try: | |
cls = self._geterrnoclass(_winerrnomap[errno]) | |
except KeyError: | |
raise value | |
> raise cls("%s%r" % (func.__name__, args)) | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
__________________________________________________________________________________ ERROR at setup of test_write_generic ___________________________________________________________________________________ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011bc0b8a0>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
> return func(*args, **kwargs) | |
E OSError: [Errno 24] Too many open files: '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError | |
During handling of the above exception, another exception occurred: | |
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x0000000114ca6020>, when = 'setup', treat_keyboard_interrupt_as_exception = False | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:201: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:183: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:104: in pytest_runtest_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py:370: in prepare | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py:1434: in setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:295: in fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:466: in _fillfixtures | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:510: in getfixturevalue | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:533: in _get_active_fixturedef | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:604: in _compute_fixture_value | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:897: in execute | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py:258: in __call__ | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:67: in _hookexec | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py:61: in <lambda> | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:939: in pytest_fixture_setup | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/fixtures.py:800: in call_fixture_func | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:130: in tmpdir | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/tmpdir.py:41: in mktemp | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:856: in make_numbered_dir | |
for path in rootdir.listdir(): | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_path/local.py:387: in listdir | |
names = py.error.checked_call(os.listdir, self.strpath) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <module 'py.error'>, func = <built-in function listdir>, args = ('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',), kwargs = {}, __tracebackhide__ = False | |
cls = <class 'py.error.EMFILE'>, value = OSError(24, 'Too many open files'), tb = <traceback object at 0x000000011bc0b8a0>, errno = 24 | |
def checked_call(self, func, *args, **kwargs): | |
""" call a function and raise an errno-exception if applicable. """ | |
__tracebackhide__ = True | |
try: | |
return func(*args, **kwargs) | |
except self.Error: | |
raise | |
except (OSError, EnvironmentError): | |
cls, value, tb = sys.exc_info() | |
if not hasattr(value, 'errno'): | |
raise | |
__tracebackhide__ = False | |
errno = value.errno | |
try: | |
if not isinstance(value, WindowsError): | |
raise NameError | |
except NameError: | |
# we are not on Windows, or we got a proper OSError | |
cls = self._geterrnoclass(errno) | |
else: | |
try: | |
cls = self._geterrnoclass(_winerrnomap[errno]) | |
except KeyError: | |
raise value | |
> raise cls("%s%r" % (func.__name__, args)) | |
E py.error.EMFILE: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:86: EMFILE | |
_____________________________________________________________________________________ ERROR at setup of test_bst_add ______________________________________________________________________________________ | |
@pytest.fixture | |
def bst(): | |
> return tree() | |
E _pytest.deprecated.RemovedInPytest4Warning: Fixture tree called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information. | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_bst.py:33: RemovedInPytest4Warning | |
__________________________________________________________________________________ ERROR at setup of test_bst_dimensions __________________________________________________________________________________ | |
@pytest.fixture | |
def bst(): | |
> return tree() | |
E _pytest.deprecated.RemovedInPytest4Warning: Fixture tree called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information. | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_bst.py:33: RemovedInPytest4Warning | |
___________________________________________________________________________________ ERROR at setup of test_bst_traverse ___________________________________________________________________________________ | |
@pytest.fixture | |
def bst(): | |
> return tree() | |
E _pytest.deprecated.RemovedInPytest4Warning: Fixture tree called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information. | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_bst.py:33: RemovedInPytest4Warning | |
____________________________________________________________________________________ ERROR at setup of test_bst_remove ____________________________________________________________________________________ | |
@pytest.fixture | |
def bst(): | |
> return tree() | |
E _pytest.deprecated.RemovedInPytest4Warning: Fixture tree called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information. | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_bst.py:33: RemovedInPytest4Warning | |
__________________________________________________________________________________ ERROR at setup of test_bst_duplicate ___________________________________________________________________________________ | |
@pytest.fixture | |
def bst(): | |
> return tree() | |
E _pytest.deprecated.RemovedInPytest4Warning: Fixture tree called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information. | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/tests/test_bst.py:33: RemovedInPytest4Warning | |
================================================================================================ FAILURES ================================================================================================= | |
__________________________________________________________________________________________ test_conversion[True] __________________________________________________________________________________________ | |
parallel = True | |
read_basic = functools.partial(<function _read at 0x000000011f5416a0>, local('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000g...est-of-deil/pytest-540/test_conversion_True_0'), Reader=<class 'astropy.io.ascii.fastbasic.FastBasic'>, format='basic') | |
@pytest.mark.parametrize("parallel", [True, False]) | |
def test_conversion(parallel, read_basic): | |
""" | |
The reader should try to convert each column to ints. If this fails, the | |
reader should try to convert to floats. Failing this, it should fall back | |
to strings. | |
""" | |
text = """ | |
A B C D E | |
1 a 3 4 5 | |
2. 1 9 10 -5.3e4 | |
4 2 -12 .4 six | |
""" | |
> table = read_basic(text, parallel=parallel) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:248: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/lib_pypy/_functools.py:80: in __call__ | |
return self._func(*(self._args + fargs), **fkeywords) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:74: in _read | |
'parallel': True}, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:368: in read | |
dat = fast_reader_rdr.read(table) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/fastbasic.py:120: in read | |
data, comments = self.engine.read(try_int, try_float, try_string) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
> ??? | |
E OSError: [Errno 24] Too many open files | |
astropy/io/ascii/cparser.pyx:368: OSError | |
_________________________________________________________________________________________ test_conversion[False] __________________________________________________________________________________________ | |
parallel = False | |
read_basic = functools.partial(<function _read at 0x000000011f5416a0>, local('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000g...st-of-deil/pytest-540/test_conversion_False_0'), Reader=<class 'astropy.io.ascii.fastbasic.FastBasic'>, format='basic') | |
@pytest.mark.parametrize("parallel", [True, False]) | |
def test_conversion(parallel, read_basic): | |
""" | |
The reader should try to convert each column to ints. If this fails, the | |
reader should try to convert to floats. Failing this, it should fall back | |
to strings. | |
""" | |
text = """ | |
A B C D E | |
1 a 3 4 5 | |
2. 1 9 10 -5.3e4 | |
4 2 -12 .4 six | |
""" | |
> table = read_basic(text, parallel=parallel) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:248: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib_pypy/_functools.py:80: in __call__ | |
return self._func(*(self._args + fargs), **fkeywords) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:84: in _read | |
t7 = ascii.read(filename, format=format, guess=False, **kwargs) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:368: in read | |
dat = fast_reader_rdr.read(table) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.ascii.fastbasic.FastBasic object at 0x000000011fc2fb40> | |
table = '/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540/test_conversion_False_0/table16.txt' | |
def read(self, table): | |
""" | |
Read input data (file-like object, filename, list of strings, or | |
single string) into a Table and return the result. | |
""" | |
if self.comment is not None and len(self.comment) != 1: | |
raise core.ParameterError("The C reader does not support a comment regex") | |
elif self.data_start is None: | |
raise core.ParameterError("The C reader does not allow data_start to be None") | |
elif self.header_start is not None and self.header_start < 0 and \ | |
not isinstance(self, FastCommentedHeader): | |
raise core.ParameterError("The C reader does not allow header_start to be " | |
"negative except for commented-header files") | |
elif self.data_start < 0: | |
raise core.ParameterError("The C reader does not allow data_start to be negative") | |
elif len(self.delimiter) != 1: | |
raise core.ParameterError("The C reader only supports 1-char delimiters") | |
elif len(self.quotechar) != 1: | |
raise core.ParameterError("The C reader only supports a length-1 quote character") | |
elif 'converters' in self.kwargs: | |
raise core.ParameterError("The C reader does not support passing " | |
"specialized converters") | |
elif 'encoding' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the encoding parameter") | |
elif 'Outputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Outputter parameter") | |
elif 'Inputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Inputter parameter") | |
elif 'data_Splitter' in self.kwargs or 'header_Splitter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use a Splitter class") | |
self.strict_names = self.kwargs.pop('strict_names', False) | |
fast_reader = self.kwargs.get('fast_reader', True) | |
if not isinstance(fast_reader, dict): | |
fast_reader = {} | |
fast_reader.pop('enable', None) | |
self.return_header_chars = fast_reader.pop('return_header_chars', False) | |
self.kwargs['fast_reader'] = fast_reader | |
self.engine = cparser.CParser(table, self.strip_whitespace_lines, | |
self.strip_whitespace_fields, | |
delimiter=self.delimiter, | |
header_start=self.header_start, | |
comment=self.comment, | |
quotechar=self.quotechar, | |
data_start=self.data_start, | |
fill_extra_cols=self.fill_extra_cols, | |
> **self.kwargs) | |
E OSError: [Errno 24] Too many open files | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/fastbasic.py:109: OSError | |
____________________________________________________________________________________________ test_fast_reader _____________________________________________________________________________________________ | |
> ??? | |
E OSError: [Errno 24] Too many open files | |
astropy/io/ascii/cparser.pyx:404: OSError | |
During handling of the above exception, another exception occurred: | |
table = 'a b c\n1 2 3\n4 5 6', guess = False, kwargs = {'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': True}, 'fill_values': [('', '0')], 'format': 'basic'} | |
fast_reader = {'enable': 'force', 'parallel': True, 'use_fast_converter': True} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.Basic'>, 'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': True}, 'fill_values': [('', '0')]}, format = 'basic' | |
Reader = <class 'astropy.io.ascii.basic.Basic'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
> dat = fast_reader_rdr.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:368: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.ascii.fastbasic.FastBasic object at 0x0000000136d06918>, table = 'a b c\n1 2 3\n4 5 6' | |
def read(self, table): | |
""" | |
Read input data (file-like object, filename, list of strings, or | |
single string) into a Table and return the result. | |
""" | |
if self.comment is not None and len(self.comment) != 1: | |
raise core.ParameterError("The C reader does not support a comment regex") | |
elif self.data_start is None: | |
raise core.ParameterError("The C reader does not allow data_start to be None") | |
elif self.header_start is not None and self.header_start < 0 and \ | |
not isinstance(self, FastCommentedHeader): | |
raise core.ParameterError("The C reader does not allow header_start to be " | |
"negative except for commented-header files") | |
elif self.data_start < 0: | |
raise core.ParameterError("The C reader does not allow data_start to be negative") | |
elif len(self.delimiter) != 1: | |
raise core.ParameterError("The C reader only supports 1-char delimiters") | |
elif len(self.quotechar) != 1: | |
raise core.ParameterError("The C reader only supports a length-1 quote character") | |
elif 'converters' in self.kwargs: | |
raise core.ParameterError("The C reader does not support passing " | |
"specialized converters") | |
elif 'encoding' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the encoding parameter") | |
elif 'Outputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Outputter parameter") | |
elif 'Inputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Inputter parameter") | |
elif 'data_Splitter' in self.kwargs or 'header_Splitter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use a Splitter class") | |
self.strict_names = self.kwargs.pop('strict_names', False) | |
fast_reader = self.kwargs.get('fast_reader', True) | |
if not isinstance(fast_reader, dict): | |
fast_reader = {} | |
fast_reader.pop('enable', None) | |
self.return_header_chars = fast_reader.pop('return_header_chars', False) | |
self.kwargs['fast_reader'] = fast_reader | |
self.engine = cparser.CParser(table, self.strip_whitespace_lines, | |
self.strip_whitespace_fields, | |
delimiter=self.delimiter, | |
header_start=self.header_start, | |
comment=self.comment, | |
quotechar=self.quotechar, | |
data_start=self.data_start, | |
fill_extra_cols=self.fill_extra_cols, | |
**self.kwargs) | |
conversion_info = self._read_header() | |
self.check_header() | |
if conversion_info is not None: | |
try_int, try_float, try_string = conversion_info | |
else: | |
try_int = {} | |
try_float = {} | |
try_string = {} | |
with set_locale('C'): | |
> data, comments = self.engine.read(try_int, try_float, try_string) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/fastbasic.py:120: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
> ??? | |
E astropy.io.ascii.cparser.CParserError: shared semaphore implementation required but not available: no error | |
astropy/io/ascii/cparser.pyx:368: CParserError | |
During handling of the above exception, another exception occurred: | |
def test_fast_reader(): | |
""" | |
Make sure that ascii.read() works as expected by default and with | |
fast_reader specified. | |
""" | |
text = 'a b c\n1 2 3\n4 5 6' | |
with pytest.raises(ParameterError): # C reader can't handle regex comment | |
ascii.read(text, format='fast_basic', guess=False, comment='##') | |
# Enable multiprocessing and the fast converter | |
try: | |
ascii.read(text, format='basic', guess=False, | |
> fast_reader={'parallel': True, 'use_fast_converter': True}) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:614: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
table = 'a b c\n1 2 3\n4 5 6', guess = False, kwargs = {'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': True}, 'fill_values': [('', '0')], 'format': 'basic'} | |
fast_reader = {'enable': 'force', 'parallel': True, 'use_fast_converter': True} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.Basic'>, 'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': True}, 'fill_values': [('', '0')]}, format = 'basic' | |
Reader = <class 'astropy.io.ascii.basic.Basic'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
dat = fast_reader_rdr.read(table) | |
_read_trace.append({'kwargs': fast_kwargs, | |
'Reader': fast_reader_rdr.__class__, | |
'status': 'Success with fast reader (no guessing)'}) | |
except (core.ParameterError, cparser.CParserError, UnicodeEncodeError) as err: | |
# special testing value to avoid falling back on the slow reader | |
if fast_reader['enable'] == 'force': | |
raise core.InconsistentTableError( | |
'fast reader {} exception: {}' | |
> .format(fast_reader_rdr.__class__, err)) | |
E astropy.io.ascii.core.InconsistentTableError: fast reader <class 'astropy.io.ascii.fastbasic.FastBasic'> exception: shared semaphore implementation required but not available: no error | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:377: InconsistentTableError | |
________________________________________________________________________________ test_strip_line_trailing_whitespace[True] ________________________________________________________________________________ | |
parallel = True | |
read_basic = functools.partial(<function _read at 0x000000011f5416a0>, local('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000g...il/pytest-540/test_strip_line_trailing_white0'), Reader=<class 'astropy.io.ascii.fastbasic.FastBasic'>, format='basic') | |
@pytest.mark.parametrize("parallel", [True, False]) | |
def test_strip_line_trailing_whitespace(parallel, read_basic): | |
""" | |
Readers that strip whitespace from lines should ignore | |
trailing whitespace after the last data value of each | |
row. | |
""" | |
text = 'a b c\n1 2 \n3 4 5' | |
with pytest.raises(CParserError) as e: | |
ascii.read(StringIO(text), format='fast_basic', guess=False) | |
assert 'not enough columns found in line 1' in str(e) | |
text = 'a b c\n 1 2 3 \t \n 4 5 6 ' | |
> table = read_basic(text, parallel=parallel) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:829: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib_pypy/_functools.py:80: in __call__ | |
return self._func(*(self._args + fargs), **fkeywords) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:74: in _read | |
'parallel': True}, **kwargs) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:368: in read | |
dat = fast_reader_rdr.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/fastbasic.py:120: in read | |
data, comments = self.engine.read(try_int, try_float, try_string) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
> ??? | |
E OSError: [Errno 24] Too many open files | |
astropy/io/ascii/cparser.pyx:368: OSError | |
_________________________________________________________________________________________ test_line_endings[True] _________________________________________________________________________________________ | |
> ??? | |
E OSError: [Errno 24] Too many open files | |
astropy/io/ascii/cparser.pyx:404: OSError | |
During handling of the above exception, another exception occurred: | |
table = 'a b c\r\n1 2 3\r\n4 5 6\r\n7 8 9\r\n\n', guess = False, kwargs = {'fast_reader': {'enable': 'force', 'parallel': True}, 'fill_values': [('', '0')], 'format': 'basic'} | |
fast_reader = {'enable': 'force', 'parallel': True}, new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.Basic'>, 'fast_reader': {'enable': 'force', 'parallel': True}, 'fill_values': [('', '0')]} | |
format = 'basic', Reader = <class 'astropy.io.ascii.basic.Basic'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
> dat = fast_reader_rdr.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:368: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.ascii.fastbasic.FastBasic object at 0x0000000125adf050>, table = 'a b c\r\n1 2 3\r\n4 5 6\r\n7 8 9\r\n\n' | |
def read(self, table): | |
""" | |
Read input data (file-like object, filename, list of strings, or | |
single string) into a Table and return the result. | |
""" | |
if self.comment is not None and len(self.comment) != 1: | |
raise core.ParameterError("The C reader does not support a comment regex") | |
elif self.data_start is None: | |
raise core.ParameterError("The C reader does not allow data_start to be None") | |
elif self.header_start is not None and self.header_start < 0 and \ | |
not isinstance(self, FastCommentedHeader): | |
raise core.ParameterError("The C reader does not allow header_start to be " | |
"negative except for commented-header files") | |
elif self.data_start < 0: | |
raise core.ParameterError("The C reader does not allow data_start to be negative") | |
elif len(self.delimiter) != 1: | |
raise core.ParameterError("The C reader only supports 1-char delimiters") | |
elif len(self.quotechar) != 1: | |
raise core.ParameterError("The C reader only supports a length-1 quote character") | |
elif 'converters' in self.kwargs: | |
raise core.ParameterError("The C reader does not support passing " | |
"specialized converters") | |
elif 'encoding' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the encoding parameter") | |
elif 'Outputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Outputter parameter") | |
elif 'Inputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Inputter parameter") | |
elif 'data_Splitter' in self.kwargs or 'header_Splitter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use a Splitter class") | |
self.strict_names = self.kwargs.pop('strict_names', False) | |
fast_reader = self.kwargs.get('fast_reader', True) | |
if not isinstance(fast_reader, dict): | |
fast_reader = {} | |
fast_reader.pop('enable', None) | |
self.return_header_chars = fast_reader.pop('return_header_chars', False) | |
self.kwargs['fast_reader'] = fast_reader | |
self.engine = cparser.CParser(table, self.strip_whitespace_lines, | |
self.strip_whitespace_fields, | |
delimiter=self.delimiter, | |
header_start=self.header_start, | |
comment=self.comment, | |
quotechar=self.quotechar, | |
data_start=self.data_start, | |
fill_extra_cols=self.fill_extra_cols, | |
**self.kwargs) | |
conversion_info = self._read_header() | |
self.check_header() | |
if conversion_info is not None: | |
try_int, try_float, try_string = conversion_info | |
else: | |
try_int = {} | |
try_float = {} | |
try_string = {} | |
with set_locale('C'): | |
> data, comments = self.engine.read(try_int, try_float, try_string) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/fastbasic.py:120: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
> ??? | |
E astropy.io.ascii.cparser.CParserError: shared semaphore implementation required but not available: no error | |
astropy/io/ascii/cparser.pyx:368: CParserError | |
During handling of the above exception, another exception occurred: | |
parallel = True | |
read_basic = functools.partial(<function _read at 0x000000011f5416a0>, local('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000g...t-of-deil/pytest-540/test_line_endings_True_0'), Reader=<class 'astropy.io.ascii.fastbasic.FastBasic'>, format='basic') | |
read_commented_header = functools.partial(<function _read at 0x000000011f5416a0>, local('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000g...test_line_endings_True_0'), Reader=<class 'astropy.io.ascii.fastbasic.FastCommentedHeader'>, format='commented_header') | |
read_rdb = functools.partial(<function _read at 0x000000011f5416a0>, local('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000g...ytest-of-deil/pytest-540/test_line_endings_True_0'), Reader=<class 'astropy.io.ascii.fastbasic.FastRdb'>, format='rdb') | |
@pytest.mark.parametrize("parallel", [True, False]) | |
def test_line_endings(parallel, read_basic, read_commented_header, read_rdb): | |
""" | |
Make sure the fast reader accepts CR and CR+LF | |
as newlines. | |
""" | |
text = 'a b c\n1 2 3\n4 5 6\n7 8 9\n' | |
expected = Table([[1, 4, 7], [2, 5, 8], [3, 6, 9]], names=('a', 'b', 'c')) | |
for newline in ('\r\n', '\r'): | |
> table = read_basic(text.replace('\n', newline), parallel=parallel) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:858: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib_pypy/_functools.py:80: in __call__ | |
return self._func(*(self._args + fargs), **fkeywords) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:74: in _read | |
'parallel': True}, **kwargs) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
table = 'a b c\r\n1 2 3\r\n4 5 6\r\n7 8 9\r\n\n', guess = False, kwargs = {'fast_reader': {'enable': 'force', 'parallel': True}, 'fill_values': [('', '0')], 'format': 'basic'} | |
fast_reader = {'enable': 'force', 'parallel': True}, new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.Basic'>, 'fast_reader': {'enable': 'force', 'parallel': True}, 'fill_values': [('', '0')]} | |
format = 'basic', Reader = <class 'astropy.io.ascii.basic.Basic'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
dat = fast_reader_rdr.read(table) | |
_read_trace.append({'kwargs': fast_kwargs, | |
'Reader': fast_reader_rdr.__class__, | |
'status': 'Success with fast reader (no guessing)'}) | |
except (core.ParameterError, cparser.CParserError, UnicodeEncodeError) as err: | |
# special testing value to avoid falling back on the slow reader | |
if fast_reader['enable'] == 'force': | |
raise core.InconsistentTableError( | |
'fast reader {} exception: {}' | |
> .format(fast_reader_rdr.__class__, err)) | |
E astropy.io.ascii.core.InconsistentTableError: fast reader <class 'astropy.io.ascii.fastbasic.FastBasic'> exception: shared semaphore implementation required but not available: no error | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:377: InconsistentTableError | |
_____________________________________________________________________________________ test_data_out_of_range[True-1] ______________________________________________________________________________________ | |
> ??? | |
E OSError: [Errno 24] Too many open files | |
astropy/io/ascii/cparser.pyx:404: OSError | |
During handling of the above exception, another exception occurred: | |
table = <_io.BytesIO object at 0x00000001191bc9f8>, guess = False | |
kwargs = {'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': False}, 'fill_values': [('', '0')], 'format': 'no_header'} | |
fast_reader = {'enable': 'force', 'parallel': True, 'use_fast_converter': False} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.NoHeader'>, 'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': False}, 'fill_values': [('', '0')]}, format = 'no_header' | |
Reader = <class 'astropy.io.ascii.basic.NoHeader'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
> dat = fast_reader_rdr.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:368: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.ascii.fastbasic.FastNoHeader object at 0x000000012180cc60>, table = <_io.BytesIO object at 0x00000001191bc9f8> | |
def read(self, table): | |
""" | |
Read input data (file-like object, filename, list of strings, or | |
single string) into a Table and return the result. | |
""" | |
if self.comment is not None and len(self.comment) != 1: | |
raise core.ParameterError("The C reader does not support a comment regex") | |
elif self.data_start is None: | |
raise core.ParameterError("The C reader does not allow data_start to be None") | |
elif self.header_start is not None and self.header_start < 0 and \ | |
not isinstance(self, FastCommentedHeader): | |
raise core.ParameterError("The C reader does not allow header_start to be " | |
"negative except for commented-header files") | |
elif self.data_start < 0: | |
raise core.ParameterError("The C reader does not allow data_start to be negative") | |
elif len(self.delimiter) != 1: | |
raise core.ParameterError("The C reader only supports 1-char delimiters") | |
elif len(self.quotechar) != 1: | |
raise core.ParameterError("The C reader only supports a length-1 quote character") | |
elif 'converters' in self.kwargs: | |
raise core.ParameterError("The C reader does not support passing " | |
"specialized converters") | |
elif 'encoding' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the encoding parameter") | |
elif 'Outputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Outputter parameter") | |
elif 'Inputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Inputter parameter") | |
elif 'data_Splitter' in self.kwargs or 'header_Splitter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use a Splitter class") | |
self.strict_names = self.kwargs.pop('strict_names', False) | |
fast_reader = self.kwargs.get('fast_reader', True) | |
if not isinstance(fast_reader, dict): | |
fast_reader = {} | |
fast_reader.pop('enable', None) | |
self.return_header_chars = fast_reader.pop('return_header_chars', False) | |
self.kwargs['fast_reader'] = fast_reader | |
self.engine = cparser.CParser(table, self.strip_whitespace_lines, | |
self.strip_whitespace_fields, | |
delimiter=self.delimiter, | |
header_start=self.header_start, | |
comment=self.comment, | |
quotechar=self.quotechar, | |
data_start=self.data_start, | |
fill_extra_cols=self.fill_extra_cols, | |
**self.kwargs) | |
conversion_info = self._read_header() | |
self.check_header() | |
if conversion_info is not None: | |
try_int, try_float, try_string = conversion_info | |
else: | |
try_int = {} | |
try_float = {} | |
try_string = {} | |
with set_locale('C'): | |
> data, comments = self.engine.read(try_int, try_float, try_string) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/fastbasic.py:120: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
> ??? | |
E astropy.io.ascii.cparser.CParserError: shared semaphore implementation required but not available: no error | |
astropy/io/ascii/cparser.pyx:368: CParserError | |
During handling of the above exception, another exception occurred: | |
parallel = True, reader = 1 | |
@pytest.mark.parametrize('reader', [0, 1, 2]) | |
# catch Windows environment since we cannot use _read() with custom fast_reader | |
@pytest.mark.parametrize("parallel", [False, | |
pytest.param(True, marks=pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows"))]) | |
def test_data_out_of_range(parallel, reader): | |
""" | |
Numbers with exponents beyond float64 range (|~4.94e-324 to 1.7977e+308|) | |
shall be returned as 0 and +-inf respectively by the C parser, just like | |
the Python parser. | |
Test fast converter only to nominal accuracy. | |
""" | |
# Python reader and strtod() are expected to return precise results | |
rtol = 1.e-30 | |
if reader > 1: | |
rtol = 1.e-15 | |
# passing fast_reader dict with parametrize does not work! | |
if reader > 0: | |
fast_reader = {'parallel': parallel, 'use_fast_converter': reader > 1} | |
else: | |
fast_reader = False | |
if parallel: | |
if reader < 1: | |
pytest.skip("Multiprocessing only available in fast reader") | |
elif TRAVIS: | |
pytest.xfail("Multiprocessing can sometimes fail on Travis CI") | |
fields = ['10.1E+199', '3.14e+313', '2048e+306', '0.6E-325', '-2.e345'] | |
values = np.array([1.01e200, np.inf, np.inf, 0.0, -np.inf]) | |
t = ascii.read(StringIO(' '.join(fields)), format='no_header', guess=False, | |
> fast_reader=fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:986: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
table = <_io.BytesIO object at 0x00000001191bc9f8>, guess = False | |
kwargs = {'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': False}, 'fill_values': [('', '0')], 'format': 'no_header'} | |
fast_reader = {'enable': 'force', 'parallel': True, 'use_fast_converter': False} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.NoHeader'>, 'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': False}, 'fill_values': [('', '0')]}, format = 'no_header' | |
Reader = <class 'astropy.io.ascii.basic.NoHeader'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
dat = fast_reader_rdr.read(table) | |
_read_trace.append({'kwargs': fast_kwargs, | |
'Reader': fast_reader_rdr.__class__, | |
'status': 'Success with fast reader (no guessing)'}) | |
except (core.ParameterError, cparser.CParserError, UnicodeEncodeError) as err: | |
# special testing value to avoid falling back on the slow reader | |
if fast_reader['enable'] == 'force': | |
raise core.InconsistentTableError( | |
'fast reader {} exception: {}' | |
> .format(fast_reader_rdr.__class__, err)) | |
E astropy.io.ascii.core.InconsistentTableError: fast reader <class 'astropy.io.ascii.fastbasic.FastNoHeader'> exception: shared semaphore implementation required but not available: no error | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:377: InconsistentTableError | |
_____________________________________________________________________________________ test_data_out_of_range[True-2] ______________________________________________________________________________________ | |
> ??? | |
E OSError: [Errno 24] Too many open files | |
astropy/io/ascii/cparser.pyx:404: OSError | |
During handling of the above exception, another exception occurred: | |
table = <_io.BytesIO object at 0x000000012014e170>, guess = False | |
kwargs = {'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': True}, 'fill_values': [('', '0')], 'format': 'no_header'} | |
fast_reader = {'enable': 'force', 'parallel': True, 'use_fast_converter': True} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.NoHeader'>, 'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': True}, 'fill_values': [('', '0')]}, format = 'no_header' | |
Reader = <class 'astropy.io.ascii.basic.NoHeader'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
> dat = fast_reader_rdr.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:368: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.ascii.fastbasic.FastNoHeader object at 0x000000011a0722c0>, table = <_io.BytesIO object at 0x000000012014e170> | |
def read(self, table): | |
""" | |
Read input data (file-like object, filename, list of strings, or | |
single string) into a Table and return the result. | |
""" | |
if self.comment is not None and len(self.comment) != 1: | |
raise core.ParameterError("The C reader does not support a comment regex") | |
elif self.data_start is None: | |
raise core.ParameterError("The C reader does not allow data_start to be None") | |
elif self.header_start is not None and self.header_start < 0 and \ | |
not isinstance(self, FastCommentedHeader): | |
raise core.ParameterError("The C reader does not allow header_start to be " | |
"negative except for commented-header files") | |
elif self.data_start < 0: | |
raise core.ParameterError("The C reader does not allow data_start to be negative") | |
elif len(self.delimiter) != 1: | |
raise core.ParameterError("The C reader only supports 1-char delimiters") | |
elif len(self.quotechar) != 1: | |
raise core.ParameterError("The C reader only supports a length-1 quote character") | |
elif 'converters' in self.kwargs: | |
raise core.ParameterError("The C reader does not support passing " | |
"specialized converters") | |
elif 'encoding' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the encoding parameter") | |
elif 'Outputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Outputter parameter") | |
elif 'Inputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Inputter parameter") | |
elif 'data_Splitter' in self.kwargs or 'header_Splitter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use a Splitter class") | |
self.strict_names = self.kwargs.pop('strict_names', False) | |
fast_reader = self.kwargs.get('fast_reader', True) | |
if not isinstance(fast_reader, dict): | |
fast_reader = {} | |
fast_reader.pop('enable', None) | |
self.return_header_chars = fast_reader.pop('return_header_chars', False) | |
self.kwargs['fast_reader'] = fast_reader | |
self.engine = cparser.CParser(table, self.strip_whitespace_lines, | |
self.strip_whitespace_fields, | |
delimiter=self.delimiter, | |
header_start=self.header_start, | |
comment=self.comment, | |
quotechar=self.quotechar, | |
data_start=self.data_start, | |
fill_extra_cols=self.fill_extra_cols, | |
**self.kwargs) | |
conversion_info = self._read_header() | |
self.check_header() | |
if conversion_info is not None: | |
try_int, try_float, try_string = conversion_info | |
else: | |
try_int = {} | |
try_float = {} | |
try_string = {} | |
with set_locale('C'): | |
> data, comments = self.engine.read(try_int, try_float, try_string) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/fastbasic.py:120: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
> ??? | |
E astropy.io.ascii.cparser.CParserError: shared semaphore implementation required but not available: no error | |
astropy/io/ascii/cparser.pyx:368: CParserError | |
During handling of the above exception, another exception occurred: | |
parallel = True, reader = 2 | |
@pytest.mark.parametrize('reader', [0, 1, 2]) | |
# catch Windows environment since we cannot use _read() with custom fast_reader | |
@pytest.mark.parametrize("parallel", [False, | |
pytest.param(True, marks=pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows"))]) | |
def test_data_out_of_range(parallel, reader): | |
""" | |
Numbers with exponents beyond float64 range (|~4.94e-324 to 1.7977e+308|) | |
shall be returned as 0 and +-inf respectively by the C parser, just like | |
the Python parser. | |
Test fast converter only to nominal accuracy. | |
""" | |
# Python reader and strtod() are expected to return precise results | |
rtol = 1.e-30 | |
if reader > 1: | |
rtol = 1.e-15 | |
# passing fast_reader dict with parametrize does not work! | |
if reader > 0: | |
fast_reader = {'parallel': parallel, 'use_fast_converter': reader > 1} | |
else: | |
fast_reader = False | |
if parallel: | |
if reader < 1: | |
pytest.skip("Multiprocessing only available in fast reader") | |
elif TRAVIS: | |
pytest.xfail("Multiprocessing can sometimes fail on Travis CI") | |
fields = ['10.1E+199', '3.14e+313', '2048e+306', '0.6E-325', '-2.e345'] | |
values = np.array([1.01e200, np.inf, np.inf, 0.0, -np.inf]) | |
t = ascii.read(StringIO(' '.join(fields)), format='no_header', guess=False, | |
> fast_reader=fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:986: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
table = <_io.BytesIO object at 0x000000012014e170>, guess = False | |
kwargs = {'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': True}, 'fill_values': [('', '0')], 'format': 'no_header'} | |
fast_reader = {'enable': 'force', 'parallel': True, 'use_fast_converter': True} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.NoHeader'>, 'fast_reader': {'enable': 'force', 'parallel': True, 'use_fast_converter': True}, 'fill_values': [('', '0')]}, format = 'no_header' | |
Reader = <class 'astropy.io.ascii.basic.NoHeader'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
dat = fast_reader_rdr.read(table) | |
_read_trace.append({'kwargs': fast_kwargs, | |
'Reader': fast_reader_rdr.__class__, | |
'status': 'Success with fast reader (no guessing)'}) | |
except (core.ParameterError, cparser.CParserError, UnicodeEncodeError) as err: | |
# special testing value to avoid falling back on the slow reader | |
if fast_reader['enable'] == 'force': | |
raise core.InconsistentTableError( | |
'fast reader {} exception: {}' | |
> .format(fast_reader_rdr.__class__, err)) | |
E astropy.io.ascii.core.InconsistentTableError: fast reader <class 'astropy.io.ascii.fastbasic.FastNoHeader'> exception: shared semaphore implementation required but not available: no error | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:377: InconsistentTableError | |
_______________________________________________________________________________________ test_int_out_of_range[True] _______________________________________________________________________________________ | |
> ??? | |
E OSError: [Errno 24] Too many open files | |
astropy/io/ascii/cparser.pyx:404: OSError | |
During handling of the above exception, another exception occurred: | |
table = 'P M S\n 9223372036854775806 -9223372036854775807 9223372036854775808', guess = False | |
kwargs = {'fast_reader': {'enable': 'force', 'parallel': True}, 'fill_values': [('', '0')], 'format': 'basic'}, fast_reader = {'enable': 'force', 'parallel': True} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.Basic'>, 'fast_reader': {'enable': 'force', 'parallel': True}, 'fill_values': [('', '0')]}, format = 'basic' | |
Reader = <class 'astropy.io.ascii.basic.Basic'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
> dat = fast_reader_rdr.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:368: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.ascii.fastbasic.FastBasic object at 0x0000000129ad6410>, table = 'P M S\n 9223372036854775806 -9223372036854775807 9223372036854775808' | |
def read(self, table): | |
""" | |
Read input data (file-like object, filename, list of strings, or | |
single string) into a Table and return the result. | |
""" | |
if self.comment is not None and len(self.comment) != 1: | |
raise core.ParameterError("The C reader does not support a comment regex") | |
elif self.data_start is None: | |
raise core.ParameterError("The C reader does not allow data_start to be None") | |
elif self.header_start is not None and self.header_start < 0 and \ | |
not isinstance(self, FastCommentedHeader): | |
raise core.ParameterError("The C reader does not allow header_start to be " | |
"negative except for commented-header files") | |
elif self.data_start < 0: | |
raise core.ParameterError("The C reader does not allow data_start to be negative") | |
elif len(self.delimiter) != 1: | |
raise core.ParameterError("The C reader only supports 1-char delimiters") | |
elif len(self.quotechar) != 1: | |
raise core.ParameterError("The C reader only supports a length-1 quote character") | |
elif 'converters' in self.kwargs: | |
raise core.ParameterError("The C reader does not support passing " | |
"specialized converters") | |
elif 'encoding' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the encoding parameter") | |
elif 'Outputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Outputter parameter") | |
elif 'Inputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Inputter parameter") | |
elif 'data_Splitter' in self.kwargs or 'header_Splitter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use a Splitter class") | |
self.strict_names = self.kwargs.pop('strict_names', False) | |
fast_reader = self.kwargs.get('fast_reader', True) | |
if not isinstance(fast_reader, dict): | |
fast_reader = {} | |
fast_reader.pop('enable', None) | |
self.return_header_chars = fast_reader.pop('return_header_chars', False) | |
self.kwargs['fast_reader'] = fast_reader | |
self.engine = cparser.CParser(table, self.strip_whitespace_lines, | |
self.strip_whitespace_fields, | |
delimiter=self.delimiter, | |
header_start=self.header_start, | |
comment=self.comment, | |
quotechar=self.quotechar, | |
data_start=self.data_start, | |
fill_extra_cols=self.fill_extra_cols, | |
**self.kwargs) | |
conversion_info = self._read_header() | |
self.check_header() | |
if conversion_info is not None: | |
try_int, try_float, try_string = conversion_info | |
else: | |
try_int = {} | |
try_float = {} | |
try_string = {} | |
with set_locale('C'): | |
> data, comments = self.engine.read(try_int, try_float, try_string) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/fastbasic.py:120: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
> ??? | |
E astropy.io.ascii.cparser.CParserError: shared semaphore implementation required but not available: no error | |
astropy/io/ascii/cparser.pyx:368: CParserError | |
During handling of the above exception, another exception occurred: | |
parallel = True | |
@pytest.mark.parametrize("parallel", [ | |
pytest.param(True, marks=pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows")), | |
False]) | |
def test_int_out_of_range(parallel): | |
""" | |
Integer numbers outside int range shall be returned as string columns | |
consistent with the standard (Python) parser (no 'upcasting' to float). | |
""" | |
imin = np.iinfo(int).min+1 | |
imax = np.iinfo(int).max-1 | |
huge = '{:d}'.format(imax+2) | |
text = 'P M S\n {:d} {:d} {:s}'.format(imax, imin, huge) | |
expected = Table([[imax], [imin], [huge]], names=('P', 'M', 'S')) | |
table = ascii.read(text, format='basic', guess=False, | |
> fast_reader={'parallel': parallel}) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:1027: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
table = 'P M S\n 9223372036854775806 -9223372036854775807 9223372036854775808', guess = False | |
kwargs = {'fast_reader': {'enable': 'force', 'parallel': True}, 'fill_values': [('', '0')], 'format': 'basic'}, fast_reader = {'enable': 'force', 'parallel': True} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.Basic'>, 'fast_reader': {'enable': 'force', 'parallel': True}, 'fill_values': [('', '0')]}, format = 'basic' | |
Reader = <class 'astropy.io.ascii.basic.Basic'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
dat = fast_reader_rdr.read(table) | |
_read_trace.append({'kwargs': fast_kwargs, | |
'Reader': fast_reader_rdr.__class__, | |
'status': 'Success with fast reader (no guessing)'}) | |
except (core.ParameterError, cparser.CParserError, UnicodeEncodeError) as err: | |
# special testing value to avoid falling back on the slow reader | |
if fast_reader['enable'] == 'force': | |
raise core.InconsistentTableError( | |
'fast reader {} exception: {}' | |
> .format(fast_reader_rdr.__class__, err)) | |
E astropy.io.ascii.core.InconsistentTableError: fast reader <class 'astropy.io.ascii.fastbasic.FastBasic'> exception: shared semaphore implementation required but not available: no error | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:377: InconsistentTableError | |
________________________________________________________________________________________ test_fortran_reader[True] ________________________________________________________________________________________ | |
> ??? | |
E OSError: [Errno 24] Too many open files | |
astropy/io/ascii/cparser.pyx:404: OSError | |
During handling of the above exception, another exception occurred: | |
table = 'A B C\n100.01E+99 2.0 3\n 4.2E-1 5.0E-1 0.6E4', guess = False | |
kwargs = {'fast_reader': {'enable': 'force', 'exponent_style': 'e', 'parallel': True}, 'fill_values': [('', '0')], 'format': 'basic'} | |
fast_reader = {'enable': 'force', 'exponent_style': 'e', 'parallel': True} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.Basic'>, 'fast_reader': {'enable': 'force', 'exponent_style': 'e', 'parallel': True}, 'fill_values': [('', '0')]}, format = 'basic' | |
Reader = <class 'astropy.io.ascii.basic.Basic'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
> dat = fast_reader_rdr.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:368: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.ascii.fastbasic.FastBasic object at 0x000000011e521210>, table = 'A B C\n100.01E+99 2.0 3\n 4.2E-1 5.0E-1 0.6E4' | |
def read(self, table): | |
""" | |
Read input data (file-like object, filename, list of strings, or | |
single string) into a Table and return the result. | |
""" | |
if self.comment is not None and len(self.comment) != 1: | |
raise core.ParameterError("The C reader does not support a comment regex") | |
elif self.data_start is None: | |
raise core.ParameterError("The C reader does not allow data_start to be None") | |
elif self.header_start is not None and self.header_start < 0 and \ | |
not isinstance(self, FastCommentedHeader): | |
raise core.ParameterError("The C reader does not allow header_start to be " | |
"negative except for commented-header files") | |
elif self.data_start < 0: | |
raise core.ParameterError("The C reader does not allow data_start to be negative") | |
elif len(self.delimiter) != 1: | |
raise core.ParameterError("The C reader only supports 1-char delimiters") | |
elif len(self.quotechar) != 1: | |
raise core.ParameterError("The C reader only supports a length-1 quote character") | |
elif 'converters' in self.kwargs: | |
raise core.ParameterError("The C reader does not support passing " | |
"specialized converters") | |
elif 'encoding' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the encoding parameter") | |
elif 'Outputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Outputter parameter") | |
elif 'Inputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Inputter parameter") | |
elif 'data_Splitter' in self.kwargs or 'header_Splitter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use a Splitter class") | |
self.strict_names = self.kwargs.pop('strict_names', False) | |
fast_reader = self.kwargs.get('fast_reader', True) | |
if not isinstance(fast_reader, dict): | |
fast_reader = {} | |
fast_reader.pop('enable', None) | |
self.return_header_chars = fast_reader.pop('return_header_chars', False) | |
self.kwargs['fast_reader'] = fast_reader | |
self.engine = cparser.CParser(table, self.strip_whitespace_lines, | |
self.strip_whitespace_fields, | |
delimiter=self.delimiter, | |
header_start=self.header_start, | |
comment=self.comment, | |
quotechar=self.quotechar, | |
data_start=self.data_start, | |
fill_extra_cols=self.fill_extra_cols, | |
**self.kwargs) | |
conversion_info = self._read_header() | |
self.check_header() | |
if conversion_info is not None: | |
try_int, try_float, try_string = conversion_info | |
else: | |
try_int = {} | |
try_float = {} | |
try_string = {} | |
with set_locale('C'): | |
> data, comments = self.engine.read(try_int, try_float, try_string) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/fastbasic.py:120: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
> ??? | |
E astropy.io.ascii.cparser.CParserError: shared semaphore implementation required but not available: no error | |
astropy/io/ascii/cparser.pyx:368: CParserError | |
During handling of the above exception, another exception occurred: | |
parallel = True | |
@pytest.mark.parametrize("parallel", [ | |
pytest.param(True, marks=pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows")), | |
False]) | |
def test_fortran_reader(parallel): | |
""" | |
Make sure that ascii.read() can read Fortran-style exponential notation | |
using the fast_reader. | |
""" | |
text = 'A B C\n100.01{:s}+99 2.0 3\n 4.2{:s}-1 5.0{:s}-1 0.6{:s}4' | |
expected = Table([[1.0001e101, 0.42], [2, 0.5], [3.0, 6000]], | |
names=('A', 'B', 'C')) | |
expstyles = {'e': 4*('E'), 'D': ('D', 'd', 'd', 'D'), 'Q': 2*('q', 'Q'), | |
'fortran': ('D', 'E', 'Q', 'd')} | |
# C strtod (not-fast converter) can't handle Fortran exp | |
with pytest.raises(FastOptionsError) as e: | |
ascii.read(text.format(*(4*('D'))), format='basic', guess=False, | |
fast_reader={'use_fast_converter': False, | |
'parallel': parallel, 'exponent_style': 'D'}) | |
assert 'fast_reader: exponent_style requires use_fast_converter' in str(e) | |
# enable multiprocessing and the fast converter | |
# iterate over all style-exponent combinations | |
for s, c in expstyles.items(): | |
table = ascii.read(text.format(*c), format='basic', guess=False, | |
fast_reader={'parallel': parallel, | |
> 'exponent_style': s}) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:1078: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
table = 'A B C\n100.01E+99 2.0 3\n 4.2E-1 5.0E-1 0.6E4', guess = False | |
kwargs = {'fast_reader': {'enable': 'force', 'exponent_style': 'e', 'parallel': True}, 'fill_values': [('', '0')], 'format': 'basic'} | |
fast_reader = {'enable': 'force', 'exponent_style': 'e', 'parallel': True} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.Basic'>, 'fast_reader': {'enable': 'force', 'exponent_style': 'e', 'parallel': True}, 'fill_values': [('', '0')]}, format = 'basic' | |
Reader = <class 'astropy.io.ascii.basic.Basic'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
dat = fast_reader_rdr.read(table) | |
_read_trace.append({'kwargs': fast_kwargs, | |
'Reader': fast_reader_rdr.__class__, | |
'status': 'Success with fast reader (no guessing)'}) | |
except (core.ParameterError, cparser.CParserError, UnicodeEncodeError) as err: | |
# special testing value to avoid falling back on the slow reader | |
if fast_reader['enable'] == 'force': | |
raise core.InconsistentTableError( | |
'fast reader {} exception: {}' | |
> .format(fast_reader_rdr.__class__, err)) | |
E astropy.io.ascii.core.InconsistentTableError: fast reader <class 'astropy.io.ascii.fastbasic.FastBasic'> exception: shared semaphore implementation required but not available: no error | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:377: InconsistentTableError | |
_____________________________________________________________________________________ test_fortran_invalid_exp[True] ______________________________________________________________________________________ | |
> ??? | |
E OSError: [Errno 24] Too many open files | |
astropy/io/ascii/cparser.pyx:404: OSError | |
During handling of the above exception, another exception occurred: | |
table = <_io.BytesIO object at 0x0000000135ffa800>, guess = False | |
kwargs = {'fast_reader': {'enable': 'force', 'exponent_style': 'A', 'parallel': True}, 'fill_values': [('', '0')], 'format': 'no_header'} | |
fast_reader = {'enable': 'force', 'exponent_style': 'A', 'parallel': True} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.NoHeader'>, 'fast_reader': {'enable': 'force', 'exponent_style': 'A', 'parallel': True}, 'fill_values': [('', '0')]}, format = 'no_header' | |
Reader = <class 'astropy.io.ascii.basic.NoHeader'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
> dat = fast_reader_rdr.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:368: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.ascii.fastbasic.FastNoHeader object at 0x00000001367b0a30>, table = <_io.BytesIO object at 0x0000000135ffa800> | |
def read(self, table): | |
""" | |
Read input data (file-like object, filename, list of strings, or | |
single string) into a Table and return the result. | |
""" | |
if self.comment is not None and len(self.comment) != 1: | |
raise core.ParameterError("The C reader does not support a comment regex") | |
elif self.data_start is None: | |
raise core.ParameterError("The C reader does not allow data_start to be None") | |
elif self.header_start is not None and self.header_start < 0 and \ | |
not isinstance(self, FastCommentedHeader): | |
raise core.ParameterError("The C reader does not allow header_start to be " | |
"negative except for commented-header files") | |
elif self.data_start < 0: | |
raise core.ParameterError("The C reader does not allow data_start to be negative") | |
elif len(self.delimiter) != 1: | |
raise core.ParameterError("The C reader only supports 1-char delimiters") | |
elif len(self.quotechar) != 1: | |
raise core.ParameterError("The C reader only supports a length-1 quote character") | |
elif 'converters' in self.kwargs: | |
raise core.ParameterError("The C reader does not support passing " | |
"specialized converters") | |
elif 'encoding' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the encoding parameter") | |
elif 'Outputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Outputter parameter") | |
elif 'Inputter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use the Inputter parameter") | |
elif 'data_Splitter' in self.kwargs or 'header_Splitter' in self.kwargs: | |
raise core.ParameterError("The C reader does not use a Splitter class") | |
self.strict_names = self.kwargs.pop('strict_names', False) | |
fast_reader = self.kwargs.get('fast_reader', True) | |
if not isinstance(fast_reader, dict): | |
fast_reader = {} | |
fast_reader.pop('enable', None) | |
self.return_header_chars = fast_reader.pop('return_header_chars', False) | |
self.kwargs['fast_reader'] = fast_reader | |
self.engine = cparser.CParser(table, self.strip_whitespace_lines, | |
self.strip_whitespace_fields, | |
delimiter=self.delimiter, | |
header_start=self.header_start, | |
comment=self.comment, | |
quotechar=self.quotechar, | |
data_start=self.data_start, | |
fill_extra_cols=self.fill_extra_cols, | |
**self.kwargs) | |
conversion_info = self._read_header() | |
self.check_header() | |
if conversion_info is not None: | |
try_int, try_float, try_string = conversion_info | |
else: | |
try_int = {} | |
try_float = {} | |
try_string = {} | |
with set_locale('C'): | |
> data, comments = self.engine.read(try_int, try_float, try_string) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/fastbasic.py:120: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
> ??? | |
E astropy.io.ascii.cparser.CParserError: shared semaphore implementation required but not available: no error | |
astropy/io/ascii/cparser.pyx:368: CParserError | |
During handling of the above exception, another exception occurred: | |
parallel = True | |
@pytest.mark.parametrize("parallel", [ | |
pytest.param(True, marks=pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows")), | |
False]) | |
def test_fortran_invalid_exp(parallel): | |
""" | |
Test Fortran-style exponential notation in the fast_reader with invalid | |
exponent-like patterns (no triple-digits) to make sure they are returned | |
as strings instead, as with the standard C parser. | |
""" | |
if parallel and TRAVIS: | |
pytest.xfail("Multiprocessing can sometimes fail on Travis CI") | |
fields = ['1.0001+1', '.42d1', '2.3+10', '0.5', '3+1001', '3000.', | |
'2', '4.56e-2.3', '8000', '4.2-122'] | |
values = ['1.0001+1', 4.2, '2.3+10', 0.5, '3+1001', 3.e3, | |
2, '4.56e-2.3', 8000, 4.2e-122] | |
t = ascii.read(StringIO(' '.join(fields)), format='no_header', guess=False, | |
> fast_reader={'parallel': parallel, 'exponent_style': 'A'}) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_c_reader.py:1112: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
table = <_io.BytesIO object at 0x0000000135ffa800>, guess = False | |
kwargs = {'fast_reader': {'enable': 'force', 'exponent_style': 'A', 'parallel': True}, 'fill_values': [('', '0')], 'format': 'no_header'} | |
fast_reader = {'enable': 'force', 'exponent_style': 'A', 'parallel': True} | |
new_kwargs = {'Reader': <class 'astropy.io.ascii.basic.NoHeader'>, 'fast_reader': {'enable': 'force', 'exponent_style': 'A', 'parallel': True}, 'fill_values': [('', '0')]}, format = 'no_header' | |
Reader = <class 'astropy.io.ascii.basic.NoHeader'> | |
def read(table, guess=None, **kwargs): | |
""" | |
Read the input ``table`` and return the table. Most of | |
the default behavior for various parameters is determined by the Reader | |
class. | |
Parameters | |
---------- | |
table : str, file-like, list, pathlib.Path object | |
Input table as a file name, file-like object, list of strings, | |
single newline-separated string or pathlib.Path object . | |
guess : bool | |
Try to guess the table format. Defaults to None. | |
format : str, `~astropy.io.ascii.BaseReader` | |
Input table format | |
Inputter : `~astropy.io.ascii.BaseInputter` | |
Inputter class | |
Outputter : `~astropy.io.ascii.BaseOutputter` | |
Outputter class | |
delimiter : str | |
Column delimiter string | |
comment : str | |
Regular expression defining a comment line in table | |
quotechar : str | |
One-character string to quote fields containing special characters | |
header_start : int | |
Line index for the header line not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_start : int | |
Line index for the start of data not counting comment or blank lines. | |
A line with only whitespace is considered blank. | |
data_end : int | |
Line index for the end of data not counting comment or blank lines. | |
This value can be negative to count from the end. | |
converters : dict | |
Dictionary of converters | |
data_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split data columns | |
header_Splitter : `~astropy.io.ascii.BaseSplitter` | |
Splitter class to split header columns | |
names : list | |
List of names corresponding to each data column | |
include_names : list | |
List of names to include in output. | |
exclude_names : list | |
List of names to exclude from output (applied after ``include_names``) | |
fill_values : dict | |
specification of fill values for bad or missing table values | |
fill_include_names : list | |
List of names to include in fill_values. | |
fill_exclude_names : list | |
List of names to exclude from fill_values (applied after ``fill_include_names``) | |
fast_reader : bool or dict | |
Whether to use the C engine, can also be a dict with options which | |
defaults to `False`; parameters for options dict: | |
use_fast_converter: bool | |
enable faster but slightly imprecise floating point conversion method | |
parallel: bool or int | |
multiprocessing conversion using ``cpu_count()`` or ``'number'`` processes | |
exponent_style: str | |
One-character string defining the exponent or ``'Fortran'`` to auto-detect | |
Fortran-style scientific notation like ``'3.14159D+00'`` (``'E'``, ``'D'``, ``'Q'``), | |
all case-insensitive; default ``'E'``, all other imply ``use_fast_converter`` | |
chunk_size : int | |
If supplied with a value > 0 then read the table in chunks of | |
approximately ``chunk_size`` bytes. Default is reading table in one pass. | |
chunk_generator : bool | |
If True and ``chunk_size > 0`` then return an iterator that returns a | |
table for each chunk. The default is to return a single stacked table | |
for all the chunks. | |
Reader : `~astropy.io.ascii.BaseReader` | |
Reader class (DEPRECATED) | |
encoding: str | |
Allow to specify encoding to read the file (default= ``None``). | |
Returns | |
------- | |
dat : `~astropy.table.Table` OR <generator> | |
Output table | |
""" | |
del _read_trace[:] | |
# Downstream readers might munge kwargs | |
kwargs = copy.deepcopy(kwargs) | |
# Convert fast_reader into a dict if not already and make sure 'enable' | |
# key is available. | |
fast_reader = kwargs.get('fast_reader', True) | |
if isinstance(fast_reader, dict): | |
fast_reader.setdefault('enable', 'force') | |
else: | |
fast_reader = {'enable': fast_reader} | |
kwargs['fast_reader'] = fast_reader | |
if fast_reader['enable'] and fast_reader.get('chunk_size'): | |
return _read_in_chunks(table, **kwargs) | |
if 'fill_values' not in kwargs: | |
kwargs['fill_values'] = [('', '0')] | |
# If an Outputter is supplied in kwargs that will take precedence. | |
new_kwargs = {} | |
if 'Outputter' in kwargs: # user specified Outputter, not supported for fast reading | |
fast_reader['enable'] = False | |
format = kwargs.get('format') | |
new_kwargs.update(kwargs) | |
# Get the Reader class based on possible format and Reader kwarg inputs. | |
Reader = _get_format_class(format, kwargs.get('Reader'), 'Reader') | |
if Reader is not None: | |
new_kwargs['Reader'] = Reader | |
format = Reader._format_name | |
# Remove format keyword if there, this is only allowed in read() not get_reader() | |
if 'format' in new_kwargs: | |
del new_kwargs['format'] | |
if guess is None: | |
guess = _GUESS | |
if guess: | |
# If ``table`` is probably an HTML file then tell guess function to add | |
# the HTML reader at the top of the guess list. This is in response to | |
# issue #3691 (and others) where libxml can segfault on a long non-HTML | |
# file, thus prompting removal of the HTML reader from the default | |
# guess list. | |
new_kwargs['guess_html'] = _probably_html(table) | |
# If `table` is a filename or readable file object then read in the | |
# file now. This prevents problems in Python 3 with the file object | |
# getting closed or left at the file end. See #3132, #3013, #3109, | |
# #2001. If a `readme` arg was passed that implies CDS format, in | |
# which case the original `table` as the data filename must be left | |
# intact. | |
if 'readme' not in new_kwargs: | |
encoding = kwargs.get('encoding') | |
try: | |
with get_readable_fileobj(table, encoding=encoding) as fileobj: | |
table = fileobj.read() | |
except ValueError: # unreadable or invalid binary file | |
raise | |
except Exception: | |
pass | |
else: | |
# Ensure that `table` has at least one \r or \n in it | |
# so that the core.BaseInputter test of | |
# ('\n' not in table and '\r' not in table) | |
# will fail and so `table` cannot be interpreted there | |
# as a filename. See #4160. | |
if not re.search(r'[\r\n]', table): | |
table = table + os.linesep | |
# If the table got successfully read then look at the content | |
# to see if is probably HTML, but only if it wasn't already | |
# identified as HTML based on the filename. | |
if not new_kwargs['guess_html']: | |
new_kwargs['guess_html'] = _probably_html(table) | |
# Get the table from guess in ``dat``. If ``dat`` comes back as None | |
# then there was just one set of kwargs in the guess list so fall | |
# through below to the non-guess way so that any problems result in a | |
# more useful traceback. | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
if dat is None: | |
guess = False | |
if not guess: | |
reader = get_reader(**new_kwargs) | |
if format is None: | |
format = reader._format_name | |
# Try the fast reader version of `format` first if applicable. Note that | |
# if user specified a fast format (e.g. format='fast_basic') this test | |
# will fail and the else-clause below will be used. | |
if fast_reader['enable'] and 'fast_{0}'.format(format) in core.FAST_CLASSES: | |
fast_kwargs = copy.deepcopy(new_kwargs) | |
fast_kwargs['Reader'] = core.FAST_CLASSES['fast_{0}'.format(format)] | |
fast_reader_rdr = get_reader(**fast_kwargs) | |
try: | |
dat = fast_reader_rdr.read(table) | |
_read_trace.append({'kwargs': fast_kwargs, | |
'Reader': fast_reader_rdr.__class__, | |
'status': 'Success with fast reader (no guessing)'}) | |
except (core.ParameterError, cparser.CParserError, UnicodeEncodeError) as err: | |
# special testing value to avoid falling back on the slow reader | |
if fast_reader['enable'] == 'force': | |
raise core.InconsistentTableError( | |
'fast reader {} exception: {}' | |
> .format(fast_reader_rdr.__class__, err)) | |
E astropy.io.ascii.core.InconsistentTableError: fast reader <class 'astropy.io.ascii.fastbasic.FastNoHeader'> exception: shared semaphore implementation required but not available: no error | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:377: InconsistentTableError | |
____________________________________________________________________________________________ test_description _____________________________________________________________________________________________ | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_cds_header_from_readme.py:27: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_cds_header_from_readme.py:10: in read_table1 | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/cds.py:319: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = 't/cds/description/table.dat', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: 't/cds/description/table.dat' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
____________________________________________________________________________________________ test_multi_header ____________________________________________________________________________________________ | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_cds_header_from_readme.py:42: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_cds_header_from_readme.py:10: in read_table1 | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/cds.py:319: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = 't/cds/multi/lhs2065.dat', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: 't/cds/multi/lhs2065.dat' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
____________________________________________________________________________________________ test_glob_header _____________________________________________________________________________________________ | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_cds_header_from_readme.py:58: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_cds_header_from_readme.py:10: in read_table1 | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/cds.py:319: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = 't/cds/glob/lmxbrefs.dat', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: 't/cds/glob/lmxbrefs.dat' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
_________________________________________________________________________________________ test_header_from_readme _________________________________________________________________________________________ | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_cds_header_from_readme.py:66: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/cds.py:319: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = 't/vizier/table1.dat', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: 't/vizier/table1.dat' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
_______________________________________________________________________________________ test_gzip[t/daophot.dat.gz] _______________________________________________________________________________________ | |
filename = 't/daophot.dat.gz' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_compressed.py:31: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/daophot.dat.gz', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/daophot.dat.gz' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
_______________________________________________________________________________________ test_gzip[t/latex1.tex.gz] ________________________________________________________________________________________ | |
filename = 't/latex1.tex.gz' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_compressed.py:31: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/latex1.tex.gz', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/latex1.tex.gz' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
________________________________________________________________________________________ test_gzip[t/short.rdb.gz] ________________________________________________________________________________________ | |
filename = 't/short.rdb.gz' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_compressed.py:31: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/short.rdb.gz', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/short.rdb.gz' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
_______________________________________________________________________________________ test_bzip2[t/short.rdb.bz2] _______________________________________________________________________________________ | |
filename = 't/short.rdb.bz2' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_compressed.py:40: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/short.rdb.bz2', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/short.rdb.bz2' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
_______________________________________________________________________________________ test_bzip2[t/ipac.dat.bz2] ________________________________________________________________________________________ | |
filename = 't/ipac.dat.bz2' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_compressed.py:40: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/ipac.dat.bz2', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/ipac.dat.bz2' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
_________________________________________________________________________________________ test_xz[t/short.rdb.xz] _________________________________________________________________________________________ | |
filename = 't/short.rdb.xz' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_compressed.py:49: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/short.rdb.xz', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/short.rdb.xz' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
_________________________________________________________________________________________ test_xz[t/ipac.dat.xz] __________________________________________________________________________________________ | |
filename = 't/ipac.dat.xz' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_compressed.py:49: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/ipac.dat.xz', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/ipac.dat.xz' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
______________________________________________________________________________________ test_read_generic[t/cds.dat] _______________________________________________________________________________________ | |
filename = 't/cds.dat' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_connect.py:37: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/table/table.py:2533: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/registry.py:517: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/connect.py:20: in read_asciitable | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/cds.dat', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/cds.dat' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
______________________________________________________________________________________ test_read_generic[t/ipac.dat] ______________________________________________________________________________________ | |
filename = 't/ipac.dat' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_connect.py:37: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/table/table.py:2533: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/registry.py:517: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/connect.py:20: in read_asciitable | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/ipac.dat', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/ipac.dat' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
____________________________________________________________________________________ test_read_generic[t/daophot.dat] _____________________________________________________________________________________ | |
filename = 't/daophot.dat' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_connect.py:37: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/table/table.py:2533: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/registry.py:517: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/connect.py:20: in read_asciitable | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/daophot.dat', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/daophot.dat' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
_____________________________________________________________________________________ test_read_generic[t/latex1.tex] _____________________________________________________________________________________ | |
filename = 't/latex1.tex' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_connect.py:37: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/table/table.py:2533: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/registry.py:517: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/connect.py:20: in read_asciitable | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/latex1.tex', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/latex1.tex' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
___________________________________________________________________________________ test_read_generic[t/simple_csv.csv] ___________________________________________________________________________________ | |
filename = 't/simple_csv.csv' | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_connect.py:37: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/table/table.py:2533: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/registry.py:517: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/connect.py:20: in read_asciitable | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:351: in read | |
dat = _guess(table, new_kwargs, format, fast_reader) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:497: in _guess | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/simple_csv.csv', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/simple_csv.csv' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
_____________________________________________________________________________________________ test_read_ipac ______________________________________________________________________________________________ | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_connect.py:48: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/table/table.py:2533: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/registry.py:517: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib_pypy/_functools.py:80: in __call__ | |
return self._func(*(self._args + fargs), **fkeywords) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/connect.py:37: in io_read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:385: in read | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/ipac.dat', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/ipac.dat' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
______________________________________________________________________________________________ test_read_cds ______________________________________________________________________________________________ | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_connect.py:52: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/table/table.py:2533: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/registry.py:517: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib_pypy/_functools.py:80: in __call__ | |
return self._func(*(self._args + fargs), **fkeywords) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/connect.py:37: in io_read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:385: in read | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/cds.py:319: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/cds.dat', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/cds.dat' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
____________________________________________________________________________________________ test_read_dapphot ____________________________________________________________________________________________ | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_connect.py:56: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/table/table.py:2533: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/registry.py:517: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib_pypy/_functools.py:80: in __call__ | |
return self._func(*(self._args + fargs), **fkeywords) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/connect.py:37: in io_read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:385: in read | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
??? | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/daophot.dat', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
> ??? | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/daophot.dat' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
_____________________________________________________________________________________________ test_read_latex _____________________________________________________________________________________________ | |
> ??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/test_connect.py:60: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/table/table.py:2533: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/registry.py:517: in read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib_pypy/_functools.py:80: in __call__ | |
return self._func(*(self._args + fargs), **fkeywords) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/connect.py:37: in io_read | |
??? | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/ui.py:385: in read | |
dat = reader.read(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:1146: in read | |
self.lines = self.inputter.get_lines(table) | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/core.py:293: in get_lines | |
encoding=self.encoding) as fileobj: | |
/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/contextlib.py:59: in __enter__ | |
return next(self.gen) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
name_or_obj = '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/latex1.tex', encoding = None, cache = False, show_progress = True, remote_timeout = 10.0 | |
@contextlib.contextmanager | |
def get_readable_fileobj(name_or_obj, encoding=None, cache=False, | |
show_progress=True, remote_timeout=None): | |
""" | |
Given a filename, pathlib.Path object or a readable file-like object, return a context | |
manager that yields a readable file-like object. | |
This supports passing filenames, URLs, and readable file-like objects, | |
any of which can be compressed in gzip, bzip2 or lzma (xz) if the | |
appropriate compression libraries are provided by the Python installation. | |
Notes | |
----- | |
This function is a context manager, and should be used for example | |
as:: | |
with get_readable_fileobj('file.dat') as f: | |
contents = f.read() | |
Parameters | |
---------- | |
name_or_obj : str or file-like object | |
The filename of the file to access (if given as a string), or | |
the file-like object to access. | |
If a file-like object, it must be opened in binary mode. | |
encoding : str, optional | |
When `None` (default), returns a file-like object with a | |
``read`` method that returns `str` (``unicode``) objects, using | |
`locale.getpreferredencoding` as an encoding. This matches | |
the default behavior of the built-in `open` when no ``mode`` | |
argument is provided. | |
When ``'binary'``, returns a file-like object where its ``read`` | |
method returns `bytes` objects. | |
When another string, it is the name of an encoding, and the | |
file-like object's ``read`` method will return `str` (``unicode``) | |
objects, decoded from binary using the given encoding. | |
cache : bool, optional | |
Whether to cache the contents of remote URLs. | |
show_progress : bool, optional | |
Whether to display a progress bar if the file is downloaded | |
from a remote server. Default is `True`. | |
remote_timeout : float | |
Timeout for remote requests in seconds (default is the configurable | |
`astropy.utils.data.Conf.remote_timeout`, which is 3s by default) | |
Returns | |
------- | |
file : readable file-like object | |
""" | |
# close_fds is a list of file handles created by this function | |
# that need to be closed. We don't want to always just close the | |
# returned file handle, because it may simply be the file handle | |
# passed in. In that case it is not the responsibility of this | |
# function to close it: doing so could result in a "double close" | |
# and an "invalid file descriptor" exception. | |
PATH_TYPES = (str, pathlib.Path) | |
close_fds = [] | |
delete_fds = [] | |
if remote_timeout is None: | |
# use configfile default | |
remote_timeout = conf.remote_timeout | |
# Get a file object to the content | |
if isinstance(name_or_obj, PATH_TYPES): | |
# name_or_obj could be a Path object if pathlib is available | |
name_or_obj = str(name_or_obj) | |
is_url = _is_url(name_or_obj) | |
if is_url: | |
name_or_obj = download_file( | |
name_or_obj, cache=cache, show_progress=show_progress, | |
timeout=remote_timeout) | |
> fileobj = io.FileIO(name_or_obj, 'r') | |
E OSError: [Errno 24] Too many open files: '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/ascii/tests/t/latex1.tex' | |
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/data.py:193: OSError | |
_________________________________________________________________________________ TestChecksumFunctions.test_sample_file __________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x0000000114974790> | |
def test_sample_file(self): | |
hdul = fits.open(self.data('checksum.fits'), checksum=True) | |
> hdul.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:41: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________________ TestChecksumFunctions.test_image_create _________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x0000000138726c28> | |
def test_image_create(self): | |
n = np.arange(100, dtype=np.int64) | |
hdu = fits.PrimaryHDU(n) | |
hdu.writeto(self.temp('tmp.fits'), overwrite=True, checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul: | |
assert (hdu.data == hdul[0].data).all() | |
assert 'CHECKSUM' in hdul[0].header | |
assert 'DATASUM' in hdul[0].header | |
if not sys.platform.startswith('win32'): | |
# The checksum ends up being different on Windows, possibly due | |
# to slight floating point differences | |
assert hdul[0].header['CHECKSUM'] == 'ZHMkeGKjZGKjbGKj' | |
> assert hdul[0].header['DATASUM'] == '4950' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:56: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________________ TestChecksumFunctions.test_scaled_data __________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x0000000116114ad8> | |
def test_scaled_data(self): | |
with fits.open(self.data('scale.fits')) as hdul: | |
orig_data = hdul[0].data.copy() | |
hdul[0].scale('int16', 'old') | |
hdul.writeto(self.temp('tmp.fits'), overwrite=True, checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul1: | |
assert (hdul1[0].data == orig_data).all() | |
assert 'CHECKSUM' in hdul1[0].header | |
assert hdul1[0].header['CHECKSUM'] == 'cUmaeUjZcUjacUjW' | |
assert 'DATASUM' in hdul1[0].header | |
> assert hdul1[0].header['DATASUM'] == '1891563534' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:68: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011619eb80>], type = None, value = None, traceback = None | |
def __exit__(self, type, value, traceback): | |
> self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011619eb80>], output_verify = 'exception', verbose = False, closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
self.flush(output_verify=output_verify, verbose=verbose) | |
finally: | |
if self._file and closed and hasattr(self._file, 'close'): | |
> self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>> | |
def close(self): | |
""" | |
Close the 'physical' FITS file. | |
""" | |
if hasattr(self._file, 'close'): | |
self._file.close() | |
> self._maybe_close_mmap() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x0000000116114ad8> | |
def test_scaled_data(self): | |
with fits.open(self.data('scale.fits')) as hdul: | |
orig_data = hdul[0].data.copy() | |
hdul[0].scale('int16', 'old') | |
hdul.writeto(self.temp('tmp.fits'), overwrite=True, checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul1: | |
assert (hdul1[0].data == orig_data).all() | |
assert 'CHECKSUM' in hdul1[0].header | |
assert hdul1[0].header['CHECKSUM'] == 'cUmaeUjZcUjacUjW' | |
assert 'DATASUM' in hdul1[0].header | |
> assert hdul1[0].header['DATASUM'] == '1891563534' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:68: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________ TestChecksumFunctions.test_scaled_data_auto_rescale ___________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x0000000120159980> | |
def test_scaled_data_auto_rescale(self): | |
""" | |
Regression test for | |
https://github.com/astropy/astropy/issues/3883#issuecomment-115122647 | |
Ensure that when scaled data is automatically rescaled on | |
opening/writing a file that the checksum and datasum are computed for | |
the rescaled array. | |
""" | |
with fits.open(self.data('scale.fits')) as hdul: | |
# Write out a copy of the data with the rescaling applied | |
> hdul.writeto(self.temp('rescaled.fits')) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:82: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________________ TestChecksumFunctions.test_uint16_data __________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x000000011a4f82f8> | |
def test_uint16_data(self): | |
checksums = [ | |
('aDcXaCcXaCcXaCcX', '0'), ('oYiGqXi9oXiEoXi9', '1746888714'), | |
('VhqQWZoQVfoQVZoQ', '0'), ('4cPp5aOn4aOn4aOn', '0'), | |
('8aCN8X9N8aAN8W9N', '1756785133'), ('UhqdUZnbUfnbUZnb', '0'), | |
('4cQJ5aN94aNG4aN9', '0')] | |
with fits.open(self.data('o4sp040b0_raw.fits'), uint=True) as hdul: | |
hdul.writeto(self.temp('tmp.fits'), overwrite=True, checksum=True) | |
with fits.open(self.temp('tmp.fits'), uint=True, | |
checksum=True) as hdul1: | |
for idx, (hdu_a, hdu_b) in enumerate(zip(hdul, hdul1)): | |
if hdu_a.data is None or hdu_b.data is None: | |
assert hdu_a.data is hdu_b.data | |
else: | |
assert (hdu_a.data == hdu_b.data).all() | |
assert 'CHECKSUM' in hdul[idx].header | |
assert hdul[idx].header['CHECKSUM'] == checksums[idx][0] | |
assert 'DATASUM' in hdul[idx].header | |
> assert hdul[idx].header['DATASUM'] == checksums[idx][1] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:130: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000139d80020>, <astropy.io.fits.hdu.image.ImageHDU object at 0x...ts.hdu.image.ImageHDU object at 0x0000000114cd9d00>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000114f82218>] | |
type = None, value = None, traceback = None | |
def __exit__(self, type, value, traceback): | |
> self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000139d80020>, <astropy.io.fits.hdu.image.ImageHDU object at 0x...ts.hdu.image.ImageHDU object at 0x0000000114cd9d00>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000114f82218>] | |
output_verify = 'exception', verbose = False, closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
self.flush(output_verify=output_verify, verbose=verbose) | |
finally: | |
if self._file and closed and hasattr(self._file, 'close'): | |
> self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>> | |
def close(self): | |
""" | |
Close the 'physical' FITS file. | |
""" | |
if hasattr(self._file, 'close'): | |
self._file.close() | |
> self._maybe_close_mmap() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x000000011a4f82f8> | |
def test_uint16_data(self): | |
checksums = [ | |
('aDcXaCcXaCcXaCcX', '0'), ('oYiGqXi9oXiEoXi9', '1746888714'), | |
('VhqQWZoQVfoQVZoQ', '0'), ('4cPp5aOn4aOn4aOn', '0'), | |
('8aCN8X9N8aAN8W9N', '1756785133'), ('UhqdUZnbUfnbUZnb', '0'), | |
('4cQJ5aN94aNG4aN9', '0')] | |
with fits.open(self.data('o4sp040b0_raw.fits'), uint=True) as hdul: | |
hdul.writeto(self.temp('tmp.fits'), overwrite=True, checksum=True) | |
with fits.open(self.temp('tmp.fits'), uint=True, | |
checksum=True) as hdul1: | |
for idx, (hdu_a, hdu_b) in enumerate(zip(hdul, hdul1)): | |
if hdu_a.data is None or hdu_b.data is None: | |
assert hdu_a.data is hdu_b.data | |
else: | |
assert (hdu_a.data == hdu_b.data).all() | |
assert 'CHECKSUM' in hdul[idx].header | |
assert hdul[idx].header['CHECKSUM'] == checksums[idx][0] | |
assert 'DATASUM' in hdul[idx].header | |
> assert hdul[idx].header['DATASUM'] == checksums[idx][1] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:130: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_______________________________________________________________________________ TestChecksumFunctions.test_groups_hdu_data ________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x00000001371d0560> | |
def test_groups_hdu_data(self): | |
imdata = np.arange(100.0) | |
imdata.shape = (10, 1, 1, 2, 5) | |
pdata1 = np.arange(10) + 0.1 | |
pdata2 = 42 | |
x = fits.hdu.groups.GroupData(imdata, parnames=[str('abc'), str('xyz')], | |
pardata=[pdata1, pdata2], bitpix=-32) | |
hdu = fits.GroupsHDU(x) | |
hdu.writeto(self.temp('tmp.fits'), overwrite=True, checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul: | |
assert comparerecords(hdul[0].data, hdu.data) | |
assert 'CHECKSUM' in hdul[0].header | |
assert hdul[0].header['CHECKSUM'] == '3eDQAZDO4dDOAZDO' | |
assert 'DATASUM' in hdul[0].header | |
> assert hdul[0].header['DATASUM'] == '2797758084' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:146: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
______________________________________________________________________________ TestChecksumFunctions.test_binary_table_data _______________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x00000001199c6918> | |
def test_binary_table_data(self): | |
a1 = np.array(['NGC1001', 'NGC1002', 'NGC1003']) | |
a2 = np.array([11.1, 12.3, 15.2]) | |
col1 = fits.Column(name='target', format='20A', array=a1) | |
col2 = fits.Column(name='V_mag', format='E', array=a2) | |
cols = fits.ColDefs([col1, col2]) | |
tbhdu = fits.BinTableHDU.from_columns(cols) | |
tbhdu.writeto(self.temp('tmp.fits'), overwrite=True, checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul: | |
assert comparerecords(tbhdu.data, hdul[1].data) | |
assert 'CHECKSUM' in hdul[0].header | |
assert hdul[0].header['CHECKSUM'] == 'D8iBD6ZAD6fAD6ZA' | |
assert 'DATASUM' in hdul[0].header | |
assert hdul[0].header['DATASUM'] == '0' | |
assert 'CHECKSUM' in hdul[1].header | |
assert hdul[1].header['CHECKSUM'] == 'aD1Oa90MaC0Ma90M' | |
assert 'DATASUM' in hdul[1].header | |
> assert hdul[1].header['DATASUM'] == '1062205743' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:165: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
__________________________________________________________________________ TestChecksumFunctions.test_variable_length_table_data __________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x00000001170b1868> | |
def test_variable_length_table_data(self): | |
c1 = fits.Column(name='var', format='PJ()', | |
array=np.array([[45.0, 56], np.array([11, 12, 13])], | |
'O')) | |
c2 = fits.Column(name='xyz', format='2I', array=[[11, 3], [12, 4]]) | |
tbhdu = fits.BinTableHDU.from_columns([c1, c2]) | |
tbhdu.writeto(self.temp('tmp.fits'), overwrite=True, checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul: | |
assert comparerecords(tbhdu.data, hdul[1].data) | |
assert 'CHECKSUM' in hdul[0].header | |
assert hdul[0].header['CHECKSUM'] == 'D8iBD6ZAD6fAD6ZA' | |
assert 'DATASUM' in hdul[0].header | |
assert hdul[0].header['DATASUM'] == '0' | |
assert 'CHECKSUM' in hdul[1].header | |
assert hdul[1].header['CHECKSUM'] == 'YIGoaIEmZIEmaIEm' | |
assert 'DATASUM' in hdul[1].header | |
> assert hdul[1].header['DATASUM'] == '1507485' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:183: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_______________________________________________________________________________ TestChecksumFunctions.test_ascii_table_data _______________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x000000011c336410> | |
def test_ascii_table_data(self): | |
a1 = np.array(['abc', 'def']) | |
r1 = np.array([11.0, 12.0]) | |
c1 = fits.Column(name='abc', format='A3', array=a1) | |
# This column used to be E format, but the single-precision float lost | |
# too much precision when scaling so it was changed to a D | |
c2 = fits.Column(name='def', format='D', array=r1, bscale=2.3, | |
bzero=0.6) | |
c3 = fits.Column(name='t1', format='I', array=[91, 92, 93]) | |
x = fits.ColDefs([c1, c2, c3]) | |
hdu = fits.TableHDU.from_columns(x) | |
hdu.writeto(self.temp('tmp.fits'), overwrite=True, checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul: | |
assert comparerecords(hdu.data, hdul[1].data) | |
assert 'CHECKSUM' in hdul[0].header | |
assert hdul[0].header['CHECKSUM'] == 'D8iBD6ZAD6fAD6ZA' | |
assert 'DATASUM' in hdul[0].header | |
assert hdul[0].header['DATASUM'] == '0' | |
if not sys.platform.startswith('win32'): | |
# The checksum ends up being different on Windows, possibly due | |
# to slight floating point differences | |
assert 'CHECKSUM' in hdul[1].header | |
assert hdul[1].header['CHECKSUM'] == '3rKFAoI94oICAoI9' | |
assert 'DATASUM' in hdul[1].header | |
> assert hdul[1].header['DATASUM'] == '1914653725' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:210: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
____________________________________________________________________________ TestChecksumFunctions.test_compressed_image_data _____________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x00000001168942f8> | |
def test_compressed_image_data(self): | |
with fits.open(self.data('comp.fits')) as h1: | |
h1.writeto(self.temp('tmp.fits'), overwrite=True, checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as h2: | |
assert np.all(h1[1].data == h2[1].data) | |
assert 'CHECKSUM' in h2[0].header | |
assert h2[0].header['CHECKSUM'] == 'D8iBD6ZAD6fAD6ZA' | |
assert 'DATASUM' in h2[0].header | |
assert h2[0].header['DATASUM'] == '0' | |
assert 'CHECKSUM' in h2[1].header | |
assert h2[1].header['CHECKSUM'] == 'ZeAbdb8aZbAabb7a' | |
assert 'DATASUM' in h2[1].header | |
> assert h2[1].header['DATASUM'] == '113055149' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:224: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000116e87948>, <astropy.io.fits.hdu.compressed.CompImageHDU object at 0x0000000121f3b750>], type = None, value = None, traceback = None | |
def __exit__(self, type, value, traceback): | |
> self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000116e87948>, <astropy.io.fits.hdu.compressed.CompImageHDU object at 0x0000000121f3b750>], output_verify = 'exception', verbose = False | |
closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
self.flush(output_verify=output_verify, verbose=verbose) | |
finally: | |
if self._file and closed and hasattr(self._file, 'close'): | |
> self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>> | |
def close(self): | |
""" | |
Close the 'physical' FITS file. | |
""" | |
if hasattr(self._file, 'close'): | |
self._file.close() | |
> self._maybe_close_mmap() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x00000001168942f8> | |
def test_compressed_image_data(self): | |
with fits.open(self.data('comp.fits')) as h1: | |
h1.writeto(self.temp('tmp.fits'), overwrite=True, checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as h2: | |
assert np.all(h1[1].data == h2[1].data) | |
assert 'CHECKSUM' in h2[0].header | |
assert h2[0].header['CHECKSUM'] == 'D8iBD6ZAD6fAD6ZA' | |
assert 'DATASUM' in h2[0].header | |
assert h2[0].header['DATASUM'] == '0' | |
assert 'CHECKSUM' in h2[1].header | |
assert h2[1].header['CHECKSUM'] == 'ZeAbdb8aZbAabb7a' | |
assert 'DATASUM' in h2[1].header | |
> assert h2[1].header['DATASUM'] == '113055149' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:224: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________ TestChecksumFunctions.test_compressed_image_data_int16 __________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x000000011a934f00> | |
def test_compressed_image_data_int16(self): | |
n = np.arange(100, dtype='int16') | |
hdu = fits.ImageHDU(n) | |
comp_hdu = fits.CompImageHDU(hdu.data, hdu.header) | |
comp_hdu.writeto(self.temp('tmp.fits'), checksum=True) | |
hdu.writeto(self.temp('uncomp.fits'), checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul: | |
assert np.all(hdul[1].data == comp_hdu.data) | |
assert np.all(hdul[1].data == hdu.data) | |
assert 'CHECKSUM' in hdul[0].header | |
assert hdul[0].header['CHECKSUM'] == 'D8iBD6ZAD6fAD6ZA' | |
assert 'DATASUM' in hdul[0].header | |
assert hdul[0].header['DATASUM'] == '0' | |
assert 'CHECKSUM' in hdul[1].header | |
assert hdul[1]._header['CHECKSUM'] == 'J5cCJ5c9J5cAJ5c9' | |
assert 'DATASUM' in hdul[1].header | |
assert hdul[1]._header['DATASUM'] == '2453673070' | |
assert 'CHECKSUM' in hdul[1].header | |
with fits.open(self.temp('uncomp.fits'), checksum=True) as hdul2: | |
header_comp = hdul[1]._header | |
header_uncomp = hdul2[1].header | |
assert 'ZHECKSUM' in header_comp | |
assert 'CHECKSUM' in header_uncomp | |
assert header_uncomp['CHECKSUM'] == 'ZE94eE91ZE91bE91' | |
assert header_comp['ZHECKSUM'] == header_uncomp['CHECKSUM'] | |
assert 'ZDATASUM' in header_comp | |
assert 'DATASUM' in header_uncomp | |
assert header_uncomp['DATASUM'] == '160565700' | |
> assert header_comp['ZDATASUM'] == header_uncomp['DATASUM'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:256: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011c173b08>, <astropy.io.fits.hdu.image.ImageHDU object at 0x000000011c1524b8>], type = None, value = None, traceback = None | |
def __exit__(self, type, value, traceback): | |
> self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011c173b08>, <astropy.io.fits.hdu.image.ImageHDU object at 0x000000011c1524b8>], output_verify = 'exception', verbose = False | |
closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
self.flush(output_verify=output_verify, verbose=verbose) | |
finally: | |
if self._file and closed and hasattr(self._file, 'close'): | |
> self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>> | |
def close(self): | |
""" | |
Close the 'physical' FITS file. | |
""" | |
if hasattr(self._file, 'close'): | |
self._file.close() | |
> self._maybe_close_mmap() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x000000011a934f00> | |
def test_compressed_image_data_int16(self): | |
n = np.arange(100, dtype='int16') | |
hdu = fits.ImageHDU(n) | |
comp_hdu = fits.CompImageHDU(hdu.data, hdu.header) | |
comp_hdu.writeto(self.temp('tmp.fits'), checksum=True) | |
hdu.writeto(self.temp('uncomp.fits'), checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul: | |
assert np.all(hdul[1].data == comp_hdu.data) | |
assert np.all(hdul[1].data == hdu.data) | |
assert 'CHECKSUM' in hdul[0].header | |
assert hdul[0].header['CHECKSUM'] == 'D8iBD6ZAD6fAD6ZA' | |
assert 'DATASUM' in hdul[0].header | |
assert hdul[0].header['DATASUM'] == '0' | |
assert 'CHECKSUM' in hdul[1].header | |
assert hdul[1]._header['CHECKSUM'] == 'J5cCJ5c9J5cAJ5c9' | |
assert 'DATASUM' in hdul[1].header | |
assert hdul[1]._header['DATASUM'] == '2453673070' | |
assert 'CHECKSUM' in hdul[1].header | |
with fits.open(self.temp('uncomp.fits'), checksum=True) as hdul2: | |
header_comp = hdul[1]._header | |
header_uncomp = hdul2[1].header | |
assert 'ZHECKSUM' in header_comp | |
assert 'CHECKSUM' in header_uncomp | |
assert header_uncomp['CHECKSUM'] == 'ZE94eE91ZE91bE91' | |
assert header_comp['ZHECKSUM'] == header_uncomp['CHECKSUM'] | |
assert 'ZDATASUM' in header_comp | |
assert 'DATASUM' in header_uncomp | |
assert header_uncomp['DATASUM'] == '160565700' | |
> assert header_comp['ZDATASUM'] == header_uncomp['DATASUM'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:256: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
________________________________________________________________________ TestChecksumFunctions.test_compressed_image_data_float32 _________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x0000000122381638> | |
def test_compressed_image_data_float32(self): | |
n = np.arange(100, dtype='float32') | |
hdu = fits.ImageHDU(n) | |
comp_hdu = fits.CompImageHDU(hdu.data, hdu.header) | |
comp_hdu.writeto(self.temp('tmp.fits'), checksum=True) | |
hdu.writeto(self.temp('uncomp.fits'), checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul: | |
assert np.all(hdul[1].data == comp_hdu.data) | |
assert np.all(hdul[1].data == hdu.data) | |
assert 'CHECKSUM' in hdul[0].header | |
assert hdul[0].header['CHECKSUM'] == 'D8iBD6ZAD6fAD6ZA' | |
assert 'DATASUM' in hdul[0].header | |
assert hdul[0].header['DATASUM'] == '0' | |
assert 'CHECKSUM' in hdul[1].header | |
assert 'DATASUM' in hdul[1].header | |
if not sys.platform.startswith('win32'): | |
# The checksum ends up being different on Windows, possibly due | |
# to slight floating point differences | |
assert hdul[1]._header['CHECKSUM'] == 'eATIf3SHe9SHe9SH' | |
assert hdul[1]._header['DATASUM'] == '1277667818' | |
with fits.open(self.temp('uncomp.fits'), checksum=True) as hdul2: | |
header_comp = hdul[1]._header | |
header_uncomp = hdul2[1].header | |
assert 'ZHECKSUM' in header_comp | |
assert 'CHECKSUM' in header_uncomp | |
assert header_uncomp['CHECKSUM'] == 'Cgr5FZo2Cdo2CZo2' | |
assert header_comp['ZHECKSUM'] == header_uncomp['CHECKSUM'] | |
assert 'ZDATASUM' in header_comp | |
assert 'DATASUM' in header_uncomp | |
assert header_uncomp['DATASUM'] == '2393636889' | |
> assert header_comp['ZDATASUM'] == header_uncomp['DATASUM'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:291: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000118cf5ad0>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000118ca62f8>], type = None, value = None, traceback = None | |
def __exit__(self, type, value, traceback): | |
> self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000118cf5ad0>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000118ca62f8>], output_verify = 'exception', verbose = False | |
closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
self.flush(output_verify=output_verify, verbose=verbose) | |
finally: | |
if self._file and closed and hasattr(self._file, 'close'): | |
> self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>> | |
def close(self): | |
""" | |
Close the 'physical' FITS file. | |
""" | |
if hasattr(self._file, 'close'): | |
self._file.close() | |
> self._maybe_close_mmap() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x0000000122381638> | |
def test_compressed_image_data_float32(self): | |
n = np.arange(100, dtype='float32') | |
hdu = fits.ImageHDU(n) | |
comp_hdu = fits.CompImageHDU(hdu.data, hdu.header) | |
comp_hdu.writeto(self.temp('tmp.fits'), checksum=True) | |
hdu.writeto(self.temp('uncomp.fits'), checksum=True) | |
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul: | |
assert np.all(hdul[1].data == comp_hdu.data) | |
assert np.all(hdul[1].data == hdu.data) | |
assert 'CHECKSUM' in hdul[0].header | |
assert hdul[0].header['CHECKSUM'] == 'D8iBD6ZAD6fAD6ZA' | |
assert 'DATASUM' in hdul[0].header | |
assert hdul[0].header['DATASUM'] == '0' | |
assert 'CHECKSUM' in hdul[1].header | |
assert 'DATASUM' in hdul[1].header | |
if not sys.platform.startswith('win32'): | |
# The checksum ends up being different on Windows, possibly due | |
# to slight floating point differences | |
assert hdul[1]._header['CHECKSUM'] == 'eATIf3SHe9SHe9SH' | |
assert hdul[1]._header['DATASUM'] == '1277667818' | |
with fits.open(self.temp('uncomp.fits'), checksum=True) as hdul2: | |
header_comp = hdul[1]._header | |
header_uncomp = hdul2[1].header | |
assert 'ZHECKSUM' in header_comp | |
assert 'CHECKSUM' in header_uncomp | |
assert header_uncomp['CHECKSUM'] == 'Cgr5FZo2Cdo2CZo2' | |
assert header_comp['ZHECKSUM'] == header_uncomp['CHECKSUM'] | |
assert 'ZDATASUM' in header_comp | |
assert 'DATASUM' in header_uncomp | |
assert header_uncomp['DATASUM'] == '2393636889' | |
> assert header_comp['ZDATASUM'] == header_uncomp['DATASUM'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:291: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
____________________________________________________________________________________ TestChecksumFunctions.test_append ____________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x000000011f3b0020> | |
def test_append(self): | |
hdul = fits.open(self.data('tb.fits')) | |
hdul.writeto(self.temp('tmp.fits'), overwrite=True) | |
n = np.arange(100) | |
fits.append(self.temp('tmp.fits'), n, checksum=True) | |
> hdul.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:302: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________ TestChecksumFunctions.test_writeto_convenience ______________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x000000012aa32e90> | |
def test_writeto_convenience(self): | |
n = np.arange(100) | |
fits.writeto(self.temp('tmp.fits'), n, overwrite=True, checksum=True) | |
hdul = fits.open(self.temp('tmp.fits'), checksum=True) | |
self._check_checksums(hdul[0]) | |
> hdul.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:312: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________ TestChecksumFunctions.test_hdu_writeto_existing _____________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x0000000139d328e0> | |
def test_hdu_writeto_existing(self): | |
""" | |
Tests that when using writeto with checksum=True, a checksum and | |
datasum are added to HDUs that did not previously have one. | |
Regression test for https://github.com/spacetelescope/PyFITS/issues/8 | |
""" | |
with fits.open(self.data('tb.fits')) as hdul: | |
> hdul.writeto(self.temp('test.fits'), checksum=True) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:331: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
______________________________________________________________________ TestChecksumFunctions.test_open_update_mode_preserve_checksum ______________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x000000013a0134b0> | |
def test_open_update_mode_preserve_checksum(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/148 where | |
checksums are being removed from headers when a file is opened in | |
update mode, even though no changes were made to the file. | |
""" | |
self.copy_file('checksum.fits') | |
with fits.open(self.temp('checksum.fits')) as hdul: | |
> data = hdul[1].data.copy() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:365: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_______________________________________________________________________ TestChecksumFunctions.test_open_update_mode_update_checksum _______________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x000000012a6164f0> | |
def test_open_update_mode_update_checksum(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/148, part | |
2. This ensures that if a file contains a checksum, the checksum is | |
updated when changes are saved to the file, even if the file was opened | |
with the default of checksum=False. | |
An existing checksum and/or datasum are only stripped if the file is | |
opened with checksum='remove'. | |
""" | |
self.copy_file('checksum.fits') | |
with fits.open(self.temp('checksum.fits')) as hdul: | |
header = hdul[1].header.copy() | |
> data = hdul[1].data.copy() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:389: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
______________________________________________________________________________ TestChecksumFunctions.test_overwrite_invalid _______________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x000000011f4e8e58> | |
def test_overwrite_invalid(self): | |
""" | |
Tests that invalid checksum or datasum are overwriten when the file is | |
saved. | |
""" | |
reffile = self.temp('ref.fits') | |
with fits.open(self.data('tb.fits')) as hdul: | |
> hdul.writeto(reffile, checksum=True) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_checksum.py:427: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_______________________________________________________________________________________ TestSingleTable.test_memmap _______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_connect.TestSingleTable object at 0x0000000121938100>, tmpdir = local('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540/test_memmap0') | |
def test_memmap(self, tmpdir): | |
filename = str(tmpdir.join('test_simple.fts')) | |
t1 = Table(self.data) | |
t1.write(filename, overwrite=True) | |
t2 = Table.read(filename, memmap=False) | |
> t3 = Table.read(filename, memmap=True) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_connect.py:167: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/table.py:2533: in read | |
out = io_registry.read(cls, *args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/registry.py:517: in read | |
data = reader(*args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/connect.py:201: in read_table_fits | |
hdulist.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
______________________________________________________________________________ TestSingleTable.test_character_as_bytes[True] ______________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_connect.TestSingleTable object at 0x0000000137bbf050> | |
tmpdir = local('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540/test_character_as_bytes_True_0'), memmap = True | |
@pytest.mark.parametrize('memmap', (False, True)) | |
def test_character_as_bytes(self, tmpdir, memmap): | |
filename = str(tmpdir.join('test_simple.fts')) | |
t1 = Table(self.data) | |
t1.write(filename, overwrite=True) | |
> t2 = Table.read(filename, character_as_bytes=False, memmap=memmap) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_connect.py:179: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/table/table.py:2533: in read | |
out = io_registry.read(cls, *args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/registry.py:517: in read | |
data = reader(*args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/connect.py:201: in read_table_fits | |
hdulist.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
____________________________________________________________________________________________ test_bool_column _____________________________________________________________________________________________ | |
tmpdir = local('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540/test_bool_column0') | |
def test_bool_column(tmpdir): | |
""" | |
Regression test for https://github.com/astropy/astropy/issues/1953 | |
Ensures that Table columns of bools are properly written to a FITS table. | |
""" | |
arr = np.ones(5, dtype=bool) | |
arr[::2] == np.False_ | |
t = Table([arr]) | |
t.write(str(tmpdir.join('test.fits')), overwrite=True) | |
with fits.open(str(tmpdir.join('test.fits'))) as hdul: | |
assert hdul[1].data['col0'].dtype == np.dtype('bool') | |
> assert np.all(hdul[1].data['col0'] == arr) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_connect.py:323: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________________________ test_unicode_column ___________________________________________________________________________________________ | |
tmpdir = local('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540/test_unicode_column0') | |
def test_unicode_column(tmpdir): | |
""" | |
Test that a column of unicode strings is still written as one | |
byte-per-character in the FITS table (so long as the column can be ASCII | |
encoded). | |
Regression test for one of the issues fixed in | |
https://github.com/astropy/astropy/pull/4228 | |
""" | |
t = Table([np.array([u'a', u'b', u'cd'])]) | |
t.write(str(tmpdir.join('test.fits')), overwrite=True) | |
with fits.open(str(tmpdir.join('test.fits'))) as hdul: | |
assert np.all(hdul[1].data['col0'] == ['a', 'b', 'cd']) | |
> assert hdul[1].header['TFORM1'] == '2A' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_connect.py:341: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
__________________________________________________________________________________ TestConvenience.test_resource_warning __________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_convenience.TestConvenience object at 0x0000000137724100> | |
def test_resource_warning(self): | |
warnings.simplefilter('always', ResourceWarning) | |
with catch_warnings() as w: | |
> data = fits.getdata(self.data('test0.fits')) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_convenience.py:23: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/convenience.py:207: in getdata | |
hdulist.close(closed=closed) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________ TestConvenience.test_image_extension_update_header ____________________________________________________________________________ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011f687e18>, <astropy.io.fits.hdu.image.ImageHDU object at 0x00000001139e8100>], output_verify = 'exception', verbose = False | |
closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
> self.flush(output_verify=output_verify, verbose=verbose) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:891: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011f687e18>, <astropy.io.fits.hdu.image.ImageHDU object at 0x00000001139e8100>], output_verify = 'exception', verbose = False | |
> func = make_function_with_signature(func, name=name, **wrapped_args) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:827: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ([<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011f687e18>, <astropy.io.fits.hdu.image.ImageHDU object at 0x00000001139e8100>],) | |
kwargs = {'output_verify': 'exception', 'verbose': False}, curr_thread = <_MainThread(MainThread, started 140736100262784)>, single_thread = True | |
SigintHandler = <class 'astropy.io.fits.util.ignore_sigint.<locals>.wrapped.<locals>.SigintHandler'> | |
sigint_handler = <astropy.io.fits.util.ignore_sigint.<locals>.wrapped.<locals>.SigintHandler object at 0x00000001139e8b48>, old_handler = <built-in function default_int_handler> | |
@wraps(func) | |
def wrapped(*args, **kwargs): | |
# Get the name of the current thread and determine if this is a single | |
# threaded application | |
curr_thread = threading.currentThread() | |
single_thread = (threading.activeCount() == 1 and | |
curr_thread.getName() == 'MainThread') | |
class SigintHandler: | |
def __init__(self): | |
self.sigint_received = False | |
def __call__(self, signum, frame): | |
warnings.warn('KeyboardInterrupt ignored until {} is ' | |
'complete!'.format(func.__name__), | |
AstropyUserWarning) | |
self.sigint_received = True | |
sigint_handler = SigintHandler() | |
# Define new signal interput handler | |
if single_thread: | |
# Install new handler | |
old_handler = signal.signal(signal.SIGINT, sigint_handler) | |
try: | |
> func(*args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/util.py:233: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011f687e18>, <astropy.io.fits.hdu.image.ImageHDU object at 0x00000001139e8100>], output_verify = 'exception', verbose = False | |
@ignore_sigint | |
def flush(self, output_verify='fix', verbose=False): | |
""" | |
Force a write of the `HDUList` back to the file (for append and | |
update modes only). | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print verbose messages | |
""" | |
if self._file.mode not in ('append', 'update', 'ostream'): | |
warnings.warn("Flush for '{}' mode is not supported." | |
.format(self._file.mode), AstropyUserWarning) | |
return | |
if self._save_backup and self._file.mode in ('append', 'update'): | |
filename = self._file.name | |
if os.path.exists(filename): | |
# The the file doesn't actually exist anymore for some reason | |
# then there's no point in trying to make a backup | |
backup = filename + '.bak' | |
idx = 1 | |
while os.path.exists(backup): | |
backup = filename + '.bak.' + str(idx) | |
idx += 1 | |
warnings.warn('Saving a backup of {} to {}.'.format( | |
filename, backup), AstropyUserWarning) | |
try: | |
shutil.copy(filename, backup) | |
except OSError as exc: | |
raise OSError('Failed to save backup to destination {}: ' | |
'{}'.format(filename, exc)) | |
self.verify(option=output_verify) | |
if self._file.mode in ('append', 'ostream'): | |
for hdu in self: | |
if verbose: | |
try: | |
extver = str(hdu._header['extver']) | |
except KeyError: | |
extver = '' | |
# only append HDU's which are "new" | |
if hdu._new: | |
hdu._prewriteto(checksum=hdu._output_checksum) | |
with _free_space_check(self): | |
hdu._writeto(self._file) | |
if verbose: | |
print('append HDU', hdu.name, extver) | |
hdu._new = False | |
hdu._postwriteto() | |
elif self._file.mode == 'update': | |
> self._flush_update() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:770: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011f687e18>, <astropy.io.fits.hdu.image.ImageHDU object at 0x00000001139e8100>] | |
def _flush_update(self): | |
"""Implements flushing changes to a file in update mode.""" | |
for hdu in self: | |
# Need to all _prewriteto() for each HDU first to determine if | |
# resizing will be necessary | |
hdu._prewriteto(checksum=hdu._output_checksum, inplace=True) | |
try: | |
self._wasresized() | |
# if the HDUList is resized, need to write out the entire contents of | |
# the hdulist to the file. | |
if self._resize or self._file.compression: | |
> self._flush_resize() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1186: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011f687e18>, <astropy.io.fits.hdu.image.ImageHDU object at 0x00000001139e8100>] | |
def _flush_resize(self): | |
""" | |
Implements flushing changes in update mode when parts of one or more HDU | |
need to be resized. | |
""" | |
old_name = self._file.name | |
old_memmap = self._file.memmap | |
name = _tmp_name(old_name) | |
if not self._file.file_like: | |
old_mode = os.stat(old_name).st_mode | |
# The underlying file is an actual file object. The HDUList is | |
# resized, so we need to write it to a tmp file, delete the | |
# original file, and rename the tmp file to the original file. | |
if self._file.compression == 'gzip': | |
new_file = gzip.GzipFile(name, mode='ab+') | |
elif self._file.compression == 'bzip2': | |
new_file = bz2.BZ2File(name, mode='w') | |
else: | |
new_file = name | |
with self.fromfile(new_file, mode='append') as hdulist: | |
for hdu in self: | |
hdu._writeto(hdulist._file, inplace=True, copy=True) | |
if sys.platform.startswith('win'): | |
# Collect a list of open mmaps to the data; this well be | |
# used later. See below. | |
mmaps = [(idx, _get_array_mmap(hdu.data), hdu.data) | |
for idx, hdu in enumerate(self) if hdu._has_data] | |
hdulist._file.close() | |
> self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1232: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>> | |
def close(self): | |
""" | |
Close the 'physical' FITS file. | |
""" | |
if hasattr(self._file, 'close'): | |
self._file.close() | |
> self._maybe_close_mmap() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_convenience.TestConvenience object at 0x000000011f687a60> | |
def test_image_extension_update_header(self): | |
""" | |
Test that _makehdu correctly includes the header. For example in the | |
fits.update convenience function. | |
""" | |
filename = self.temp('twoextension.fits') | |
hdus = [fits.PrimaryHDU(np.zeros((10, 10))), | |
fits.ImageHDU(np.zeros((10, 10)))] | |
fits.HDUList(hdus).writeto(filename) | |
fits.update(filename, | |
np.zeros((10, 10)), | |
header=fits.Header([('WHAT', 100)]), | |
> ext=1) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_convenience.py:106: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/convenience.py:685: in update | |
hdulist.close(closed=closed) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________________ TestConvenience.test_printdiff ______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_convenience.TestConvenience object at 0x000000011f4e9d00> | |
def test_printdiff(self): | |
""" | |
Test that FITSDiff can run the different inputs without crashing. | |
""" | |
# Testing different string input options | |
> assert printdiff(self.data('arange.fits'), | |
self.data('blank.fits')) is None | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_convenience.py:116: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/convenience.py:833: in printdiff | |
print(FITSDiff(inputa, inputb, **kwargs).report()) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________________ TestConvenience.test_tabledump ______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_convenience.TestConvenience object at 0x000000011b975ec0> | |
def test_tabledump(self): | |
""" | |
Regression test for https://github.com/astropy/astropy/issues/6937 | |
""" | |
# copy fits file to the temp directory | |
self.copy_file('tb.fits') | |
# test without datafile | |
> fits.tabledump(self.temp('tb.fits')) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_convenience.py:151: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:488: in wrapper | |
return function(*args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/convenience.py:899: in tabledump | |
f.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________________________ TestCore.test_byteswap __________________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestCore object at 0x00000001365381a8> | |
def test_byteswap(self): | |
p = fits.PrimaryHDU() | |
l = fits.HDUList() | |
n = np.zeros(3, dtype='i2') | |
n[0] = 1 | |
n[1] = 60000 | |
n[2] = 2 | |
c = fits.Column(name='foo', format='i2', bscale=1, bzero=32768, | |
array=n) | |
t = fits.BinTableHDU.from_columns([c]) | |
l.append(p) | |
l.append(t) | |
l.writeto(self.temp('test.fits'), overwrite=True) | |
with fits.open(self.temp('test.fits')) as p: | |
> assert p[1].data[1]['foo'] == 60000.0 | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:68: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________________ TestCore.test_add_del_columns2 ______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestCore object at 0x00000001371ebe18> | |
def test_add_del_columns2(self): | |
hdulist = fits.open(self.data('tb.fits')) | |
table = hdulist[1] | |
assert table.data.dtype.names == ('c1', 'c2', 'c3', 'c4') | |
assert table.columns.names == ['c1', 'c2', 'c3', 'c4'] | |
> table.columns.del_col(str('c1')) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:97: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/column.py:1691: in del_col | |
self._notify('column_removed', self, indx) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/util.py:129: in _notify | |
method(*args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/table.py:587: in _update_column_removed | |
super()._update_column_removed(columns, idx) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/table.py:234: in _update_column_removed | |
del self.data | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:732: in __delete__ | |
self.fdel(obj) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.hdu.table.BinTableHDU object at 0x00000001371eba60> | |
def data(self): | |
# The deleter | |
if self._file is not None and self._data_loaded: | |
> data_refcount = sys.getrefcount(self.data) | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/base.py:106: AttributeError | |
______________________________________________________________________________________ TestCore.test_hdu_fromstring _______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestCore object at 0x0000000122381050> | |
def test_hdu_fromstring(self): | |
""" | |
Tests creating a fully-formed HDU object from a string containing the | |
bytes of the HDU. | |
""" | |
dat = open(self.data('test0.fits'), 'rb').read() | |
offset = 0 | |
with fits.open(self.data('test0.fits')) as hdul: | |
hdulen = hdul[0]._data_offset + hdul[0]._data_size | |
hdu = fits.PrimaryHDU.fromstring(dat[:hdulen]) | |
assert isinstance(hdu, fits.PrimaryHDU) | |
assert hdul[0].header == hdu.header | |
assert hdu.data is None | |
hdu.header['TEST'] = 'TEST' | |
hdu.writeto(self.temp('test.fits')) | |
with fits.open(self.temp('test.fits')) as hdul: | |
assert isinstance(hdu, fits.PrimaryHDU) | |
assert hdul[0].header[:-1] == hdu.header[:-1] | |
assert hdul[0].header['TEST'] == 'TEST' | |
assert hdu.data is None | |
with fits.open(self.data('test0.fits'))as hdul: | |
for ext_hdu in hdul[1:]: | |
offset += hdulen | |
hdulen = len(str(ext_hdu.header)) + ext_hdu._data_size | |
hdu = fits.ImageHDU.fromstring(dat[offset:offset + hdulen]) | |
assert isinstance(hdu, fits.ImageHDU) | |
assert ext_hdu.header == hdu.header | |
> assert (ext_hdu.data == hdu.data).all() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:412: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
______________________________________________________________________________________ TestCore.test_nonstandard_hdu ______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestCore object at 0x0000000114c53b40> | |
def test_nonstandard_hdu(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/157 | |
Tests that "Nonstandard" HDUs with SIMPLE = F are read and written | |
without prepending a superfluous and unwanted standard primary HDU. | |
""" | |
data = np.arange(100, dtype=np.uint8) | |
hdu = fits.PrimaryHDU(data=data) | |
hdu.header['SIMPLE'] = False | |
hdu.writeto(self.temp('test.fits')) | |
info = [(0, '', 1, 'NonstandardHDU', 5, (), '', '')] | |
with fits.open(self.temp('test.fits')) as hdul: | |
assert hdul.info(output=False) == info | |
# NonstandardHDUs just treat the data as an unspecified array of | |
# bytes. The first 100 bytes should match the original data we | |
# passed in...the rest should be zeros padding out the rest of the | |
# FITS block | |
assert (hdul[0].data[:100] == data).all() | |
> assert (hdul[0].data[100:] == 0).all() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:435: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
____________________________________________________________________________________ TestCore.test_consecutive_writeto ____________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestCore object at 0x000000011f238d08> | |
def test_consecutive_writeto(self): | |
""" | |
Regression test for an issue where calling writeto twice on the same | |
HDUList could write a corrupted file. | |
https://github.com/spacetelescope/PyFITS/issues/40 is actually a | |
particular instance of this problem, though isn't unique to sys.stdout. | |
""" | |
with fits.open(self.data('test0.fits')) as hdul1: | |
# Add a bunch of header keywords so that the data will be forced to | |
# new offsets within the file: | |
for idx in range(40): | |
hdul1[1].header['TEST{}'.format(idx)] = 'test' | |
hdul1.writeto(self.temp('test1.fits')) | |
hdul1.writeto(self.temp('test2.fits')) | |
# Open a second handle to the original file and compare it to hdul1 | |
# (We only compare part of the one header that was modified) | |
# Compare also with the second writeto output | |
with fits.open(self.data('test0.fits')) as hdul2: | |
with fits.open(self.temp('test2.fits')) as hdul3: | |
for hdul in (hdul1, hdul3): | |
for idx, hdus in enumerate(zip(hdul2, hdul)): | |
hdu2, hdu = hdus | |
if idx != 1: | |
assert hdu.header == hdu2.header | |
else: | |
assert (hdu2.header == | |
hdu.header[:len(hdu2.header)]) | |
> assert np.all(hdu.data == hdu2.data) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:532: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x00000001182ebec0>, <astropy.io.fits.hdu.image.ImageHDU object at 0x...ts.hdu.image.ImageHDU object at 0x000000012a9bf9b8>, <astropy.io.fits.hdu.image.ImageHDU object at 0x000000012a9e5cc8>] | |
type = None, value = None, traceback = None | |
def __exit__(self, type, value, traceback): | |
> self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x00000001182ebec0>, <astropy.io.fits.hdu.image.ImageHDU object at 0x...ts.hdu.image.ImageHDU object at 0x000000012a9bf9b8>, <astropy.io.fits.hdu.image.ImageHDU object at 0x000000012a9e5cc8>] | |
output_verify = 'exception', verbose = False, closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
self.flush(output_verify=output_verify, verbose=verbose) | |
finally: | |
if self._file and closed and hasattr(self._file, 'close'): | |
> self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>> | |
def close(self): | |
""" | |
Close the 'physical' FITS file. | |
""" | |
if hasattr(self._file, 'close'): | |
self._file.close() | |
> self._maybe_close_mmap() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_core.TestCore object at 0x000000011f238d08> | |
def test_consecutive_writeto(self): | |
""" | |
Regression test for an issue where calling writeto twice on the same | |
HDUList could write a corrupted file. | |
https://github.com/spacetelescope/PyFITS/issues/40 is actually a | |
particular instance of this problem, though isn't unique to sys.stdout. | |
""" | |
with fits.open(self.data('test0.fits')) as hdul1: | |
# Add a bunch of header keywords so that the data will be forced to | |
# new offsets within the file: | |
for idx in range(40): | |
hdul1[1].header['TEST{}'.format(idx)] = 'test' | |
hdul1.writeto(self.temp('test1.fits')) | |
hdul1.writeto(self.temp('test2.fits')) | |
# Open a second handle to the original file and compare it to hdul1 | |
# (We only compare part of the one header that was modified) | |
# Compare also with the second writeto output | |
with fits.open(self.data('test0.fits')) as hdul2: | |
with fits.open(self.temp('test2.fits')) as hdul3: | |
for hdul in (hdul1, hdul3): | |
for idx, hdus in enumerate(zip(hdul2, hdul)): | |
hdu2, hdu = hdus | |
if idx != 1: | |
assert hdu.header == hdu2.header | |
else: | |
assert (hdu2.header == | |
hdu.header[:len(hdu2.header)]) | |
> assert np.all(hdu.data == hdu2.data) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:532: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x00000001183a9718>, <astropy.io.fits.hdu.image.ImageHDU object at 0x...ts.hdu.image.ImageHDU object at 0x0000000139d808e0>, <astropy.io.fits.hdu.image.ImageHDU object at 0x000000012a900d78>] | |
type = <class 'AttributeError'>, value = AttributeError("module 'sys' has no attribute 'getrefcount'",), traceback = <traceback object at 0x000000012c3714e0> | |
def __exit__(self, type, value, traceback): | |
> self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x00000001183a9718>, <astropy.io.fits.hdu.image.ImageHDU object at 0x...ts.hdu.image.ImageHDU object at 0x0000000139d808e0>, <astropy.io.fits.hdu.image.ImageHDU object at 0x000000012a900d78>] | |
output_verify = 'exception', verbose = False, closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
self.flush(output_verify=output_verify, verbose=verbose) | |
finally: | |
if self._file and closed and hasattr(self._file, 'close'): | |
> self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>> | |
def close(self): | |
""" | |
Close the 'physical' FITS file. | |
""" | |
if hasattr(self._file, 'close'): | |
self._file.close() | |
> self._maybe_close_mmap() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_core.TestCore object at 0x000000011f238d08> | |
def test_consecutive_writeto(self): | |
""" | |
Regression test for an issue where calling writeto twice on the same | |
HDUList could write a corrupted file. | |
https://github.com/spacetelescope/PyFITS/issues/40 is actually a | |
particular instance of this problem, though isn't unique to sys.stdout. | |
""" | |
with fits.open(self.data('test0.fits')) as hdul1: | |
# Add a bunch of header keywords so that the data will be forced to | |
# new offsets within the file: | |
for idx in range(40): | |
hdul1[1].header['TEST{}'.format(idx)] = 'test' | |
hdul1.writeto(self.temp('test1.fits')) | |
hdul1.writeto(self.temp('test2.fits')) | |
# Open a second handle to the original file and compare it to hdul1 | |
# (We only compare part of the one header that was modified) | |
# Compare also with the second writeto output | |
with fits.open(self.data('test0.fits')) as hdul2: | |
with fits.open(self.temp('test2.fits')) as hdul3: | |
for hdul in (hdul1, hdul3): | |
for idx, hdus in enumerate(zip(hdul2, hdul)): | |
hdu2, hdu = hdus | |
if idx != 1: | |
assert hdu.header == hdu2.header | |
else: | |
assert (hdu2.header == | |
hdu.header[:len(hdu2.header)]) | |
> assert np.all(hdu.data == hdu2.data) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:532: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________ TestFileFunctions.test_updated_file_permissions _____________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestFileFunctions object at 0x00000001380fbfa0> | |
def test_updated_file_permissions(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/79 | |
Tests that when a FITS file is modified in update mode, the file | |
permissions are preserved. | |
""" | |
filename = self.temp('test.fits') | |
hdul = [fits.PrimaryHDU(), fits.ImageHDU()] | |
hdul = fits.HDUList(hdul) | |
hdul.writeto(filename) | |
old_mode = os.stat(filename).st_mode | |
hdul = fits.open(filename, mode='update') | |
hdul.insert(1, fits.ImageHDU()) | |
> hdul.flush() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:933: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:827: in flush | |
func = make_function_with_signature(func, name=name, **wrapped_args) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/util.py:233: in wrapped | |
func(*args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:770: in flush | |
self._flush_update() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1186: in _flush_update | |
self._flush_resize() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1232: in _flush_resize | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________________ TestFileFunctions.test_mmap_unwriteable _________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestFileFunctions object at 0x0000000135af40c8> | |
def test_mmap_unwriteable(self): | |
"""Regression test for https://github.com/astropy/astropy/issues/968 | |
Temporarily patches mmap.mmap to exhibit platform-specific bad | |
behavior. | |
""" | |
class MockMmap(mmap.mmap): | |
def flush(self): | |
raise OSError('flush is broken on this platform') | |
old_mmap = mmap.mmap | |
mmap.mmap = MockMmap | |
# Force the mmap test to be rerun | |
_File.__dict__['_mmap_available']._cache.clear() | |
try: | |
self.copy_file('test0.fits') | |
with catch_warnings() as w: | |
with fits.open(self.temp('test0.fits'), mode='update', | |
memmap=True) as h: | |
h[1].data[0, 0] = 999 | |
assert len(w) == 1 | |
assert 'mmap.flush is unavailable' in str(w[0].message) | |
# Double check that writing without mmap still worked | |
with fits.open(self.temp('test0.fits')) as h: | |
> assert h[1].data[0, 0] == 999 | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:1013: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________________ TestFileFunctions.test_mmap_closing ___________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestFileFunctions object at 0x000000012aa325d0> | |
def test_mmap_closing(self): | |
""" | |
Tests that the mmap reference is closed/removed when there aren't any | |
HDU data references left. | |
""" | |
if not _File._mmap_available: | |
pytest.xfail('not expected to work on platforms without mmap ' | |
'support') | |
with fits.open(self.data('test0.fits'), memmap=True) as hdul: | |
assert hdul._file._mmap is None | |
hdul[1].data | |
assert hdul._file._mmap is not None | |
> del hdul[1].data | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:1034: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.utils.decorators.lazyproperty object at 0x000000011459eea0>, obj = <astropy.io.fits.hdu.image.ImageHDU object at 0x000000012a9abc20> | |
def __delete__(self, obj): | |
if self.fdel: | |
> self.fdel(obj) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:732: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.hdu.image.ImageHDU object at 0x000000012a9abc20> | |
def data(self): | |
# The deleter | |
if self._file is not None and self._data_loaded: | |
> data_refcount = sys.getrefcount(self.data) | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/base.py:106: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_core.TestFileFunctions object at 0x000000012aa325d0> | |
def test_mmap_closing(self): | |
""" | |
Tests that the mmap reference is closed/removed when there aren't any | |
HDU data references left. | |
""" | |
if not _File._mmap_available: | |
pytest.xfail('not expected to work on platforms without mmap ' | |
'support') | |
with fits.open(self.data('test0.fits'), memmap=True) as hdul: | |
assert hdul._file._mmap is None | |
hdul[1].data | |
assert hdul._file._mmap is not None | |
del hdul[1].data | |
# Should be no more references to data in the file so close the | |
# mmap | |
assert hdul._file._mmap is None | |
hdul[1].data | |
hdul[2].data | |
del hdul[1].data | |
# hdul[2].data is still references so keep the mmap open | |
assert hdul._file._mmap is not None | |
del hdul[2].data | |
> assert hdul._file._mmap is None | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:1045: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________________ TestFileFunctions.test_uncloseable_file _________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestFileFunctions object at 0x0000000118c90950> | |
def test_uncloseable_file(self): | |
""" | |
Regression test for https://github.com/astropy/astropy/issues/2356 | |
Demonstrates that FITS files can still be read from "file-like" objects | |
that don't have an obvious "open" or "closed" state. | |
""" | |
class MyFileLike: | |
def __init__(self, foobar): | |
self._foobar = foobar | |
def read(self, n): | |
return self._foobar.read(n) | |
def seek(self, offset, whence=os.SEEK_SET): | |
self._foobar.seek(offset, whence) | |
def tell(self): | |
return self._foobar.tell() | |
with open(self.data('test0.fits'), 'rb') as f: | |
fileobj = MyFileLike(f) | |
with fits.open(fileobj) as hdul1: | |
with fits.open(self.data('test0.fits')) as hdul2: | |
assert hdul1.info(output=False) == hdul2.info(output=False) | |
for hdu1, hdu2 in zip(hdul1, hdul2): | |
assert hdu1.header == hdu2.header | |
if hdu1.data is not None and hdu2.data is not None: | |
> assert np.all(hdu1.data == hdu2.data) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:1098: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
__________________________________________________________________________________ TestFileFunctions.test_write_bytesio ___________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestFileFunctions object at 0x0000000135f657c0> | |
def test_write_bytesio(self): | |
""" | |
Regression test for https://github.com/astropy/astropy/issues/2463 | |
Test againt `io.BytesIO`. `io.StringIO` is not supported. | |
""" | |
> self._test_write_string_bytes_io(io.BytesIO()) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:1126: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:1210: in _test_write_string_bytes_io | |
assert FITSDiff(hdul, hdul2).identical | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_______________________________________________________________________________ TestFileFunctions.test_filename_with_colon ________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestFileFunctions object at 0x0000000129ae3be8> | |
@pytest.mark.skipif(str('sys.platform.startswith("win32")')) | |
def test_filename_with_colon(self): | |
""" | |
Test reading and writing a file with a colon in the filename. | |
Regression test for https://github.com/astropy/astropy/issues/3122 | |
""" | |
# Skip on Windows since colons in filenames makes NTFS sad. | |
filename = 'APEXHET.2014-04-01T15:18:01.000.fits' | |
hdu = fits.PrimaryHDU(data=np.arange(10)) | |
hdu.writeto(self.temp(filename)) | |
with fits.open(self.temp(filename)) as hdul: | |
> assert np.all(hdul[0].data == hdu.data) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:1143: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
________________________________________________________________________________ TestStreamingFunctions.test_blank_ignore _________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_core.TestStreamingFunctions object at 0x0000000122356950> | |
def test_blank_ignore(self): | |
with fits.open(self.data('blank.fits'), ignore_blank=True) as f: | |
> assert f[0].data.flat[0] == 2 | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_core.py:1322: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________________ TestDiff.test_identical_files_basic ___________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_diff.TestDiff object at 0x00000001161a9018> | |
def test_identical_files_basic(self): | |
"""Test identicality of two simple, extensionless files.""" | |
a = np.arange(100).reshape(10, 10) | |
hdu = PrimaryHDU(data=a) | |
hdu.writeto(self.temp('testa.fits')) | |
hdu.writeto(self.temp('testb.fits')) | |
> diff = FITSDiff(self.temp('testa.fits'), self.temp('testb.fits')) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_diff.py:573: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
______________________________________________________________________________________ TestFitscheck.test_valid_file ______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitscheck.TestFitscheck object at 0x0000000120952598>, capsys = <_pytest.capture.CaptureFixture object at 0x0000000120952058> | |
def test_valid_file(self, capsys): | |
testfile = self.data('checksum.fits') | |
> assert fitscheck.main([testfile]) == 0 | |
E AssertionError: assert 1 == 0 | |
E + where 1 = <function main at 0x0000000117073a60>(['/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/data/checksum.fits']) | |
E + where <function main at 0x0000000117073a60> = fitscheck.main | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitscheck.py:23: AssertionError | |
------------------------------------------------------------------------------------------ Captured stderr call ------------------------------------------------------------------------------------------- | |
--- Logging error --- | |
Traceback (most recent call last): | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitscheck.py", line 186, in process_file | |
checksum_errors = verify_checksums(filename) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitscheck.py", line 141, in verify_checksums | |
return 1 | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py", line 371, in __exit__ | |
self.close() | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py", line 894, in close | |
self._file.close() | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py", line 374, in close | |
self._maybe_close_mmap() | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py", line 392, in _maybe_close_mmap | |
sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
AttributeError: module 'sys' has no attribute 'getrefcount' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/logging/__init__.py", line 988, in emit | |
stream.write(msg) | |
ValueError: I/O operation on closed file | |
Call stack: | |
File "<string>", line 1, in <module> | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py", line 827, in test | |
func = make_function_with_signature(func, name=name, **wrapped_args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/tests/runner.py", line 260, in test | |
return runner.run_tests(**kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/tests/runner.py", line 601, in run_tests | |
return super(TestRunner, self).run_tests(**kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/tests/runner.py", line 242, in run_tests | |
return pytest.main(args=args, plugins=plugins) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/config/__init__.py", line 65, in main | |
return config.hook.pytest_cmdline_main(config=config) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py", line 258, in __call__ | |
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 67, in _hookexec | |
return self._inner_hookexec(hook, methods, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 61, in <lambda> | |
firstresult=hook.spec_opts.get('firstresult'), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/callers.py", line 180, in _multicall | |
res = hook_impl.function(*args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/main.py", line 208, in pytest_cmdline_main | |
return wrap_session(config, _main) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/main.py", line 178, in wrap_session | |
session.exitstatus = doit(config, session) or 0 | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/main.py", line 215, in _main | |
config.hook.pytest_runtestloop(session=session) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py", line 258, in __call__ | |
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 67, in _hookexec | |
return self._inner_hookexec(hook, methods, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 61, in <lambda> | |
firstresult=hook.spec_opts.get('firstresult'), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/callers.py", line 180, in _multicall | |
res = hook_impl.function(*args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/main.py", line 236, in pytest_runtestloop | |
item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py", line 258, in __call__ | |
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 67, in _hookexec | |
return self._inner_hookexec(hook, methods, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 61, in <lambda> | |
firstresult=hook.spec_opts.get('firstresult'), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/callers.py", line 180, in _multicall | |
res = hook_impl.function(*args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 66, in pytest_runtest_protocol | |
runtestprotocol(item, nextitem=nextitem) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 81, in runtestprotocol | |
reports.append(call_and_report(item, "call", log)) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 161, in call_and_report | |
call = call_runtest_hook(item, when, **kwds) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 185, in call_runtest_hook | |
treat_keyboard_interrupt_as_exception=item.config.getvalue("usepdb"), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 201, in __init__ | |
self.result = func() | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 183, in <lambda> | |
lambda: ihook(item=item, **kwds), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py", line 258, in __call__ | |
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 67, in _hookexec | |
return self._inner_hookexec(hook, methods, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 61, in <lambda> | |
firstresult=hook.spec_opts.get('firstresult'), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/callers.py", line 180, in _multicall | |
res = hook_impl.function(*args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 111, in pytest_runtest_call | |
item.runtest() | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py", line 1430, in runtest | |
self.ihook.pytest_pyfunc_call(pyfuncitem=self) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py", line 258, in __call__ | |
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 67, in _hookexec | |
return self._inner_hookexec(hook, methods, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 61, in <lambda> | |
firstresult=hook.spec_opts.get('firstresult'), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/callers.py", line 180, in _multicall | |
res = hook_impl.function(*args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py", line 196, in pytest_pyfunc_call | |
testfunction(**testargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitscheck.py", line 23, in test_valid_file | |
assert fitscheck.main([testfile]) == 0 | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitscheck.py", line 209, in main | |
errors += process_file(filename) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitscheck.py", line 195, in process_file | |
log.error('EXCEPTION {!r} .. {}'.format(filename, e)) | |
Message: "EXCEPTION '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/data/checksum.fits' .. module 'sys' has no attribute 'getrefcount'" | |
Arguments: () | |
EXCEPTION '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/data/checksum.fits' .. module 'sys' has no attribute 'getrefcount' | |
--- Logging error --- | |
Traceback (most recent call last): | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/lib-python/3/logging/__init__.py", line 988, in emit | |
stream.write(msg) | |
ValueError: I/O operation on closed file | |
Call stack: | |
File "<string>", line 1, in <module> | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py", line 827, in test | |
func = make_function_with_signature(func, name=name, **wrapped_args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/tests/runner.py", line 260, in test | |
return runner.run_tests(**kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/tests/runner.py", line 601, in run_tests | |
return super(TestRunner, self).run_tests(**kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/tests/runner.py", line 242, in run_tests | |
return pytest.main(args=args, plugins=plugins) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/config/__init__.py", line 65, in main | |
return config.hook.pytest_cmdline_main(config=config) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py", line 258, in __call__ | |
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 67, in _hookexec | |
return self._inner_hookexec(hook, methods, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 61, in <lambda> | |
firstresult=hook.spec_opts.get('firstresult'), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/callers.py", line 180, in _multicall | |
res = hook_impl.function(*args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/main.py", line 208, in pytest_cmdline_main | |
return wrap_session(config, _main) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/main.py", line 178, in wrap_session | |
session.exitstatus = doit(config, session) or 0 | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/main.py", line 215, in _main | |
config.hook.pytest_runtestloop(session=session) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py", line 258, in __call__ | |
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 67, in _hookexec | |
return self._inner_hookexec(hook, methods, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 61, in <lambda> | |
firstresult=hook.spec_opts.get('firstresult'), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/callers.py", line 180, in _multicall | |
res = hook_impl.function(*args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/main.py", line 236, in pytest_runtestloop | |
item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py", line 258, in __call__ | |
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 67, in _hookexec | |
return self._inner_hookexec(hook, methods, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 61, in <lambda> | |
firstresult=hook.spec_opts.get('firstresult'), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/callers.py", line 180, in _multicall | |
res = hook_impl.function(*args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 66, in pytest_runtest_protocol | |
runtestprotocol(item, nextitem=nextitem) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 81, in runtestprotocol | |
reports.append(call_and_report(item, "call", log)) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 161, in call_and_report | |
call = call_runtest_hook(item, when, **kwds) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 185, in call_runtest_hook | |
treat_keyboard_interrupt_as_exception=item.config.getvalue("usepdb"), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 201, in __init__ | |
self.result = func() | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 183, in <lambda> | |
lambda: ihook(item=item, **kwds), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py", line 258, in __call__ | |
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 67, in _hookexec | |
return self._inner_hookexec(hook, methods, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 61, in <lambda> | |
firstresult=hook.spec_opts.get('firstresult'), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/callers.py", line 180, in _multicall | |
res = hook_impl.function(*args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/runner.py", line 111, in pytest_runtest_call | |
item.runtest() | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py", line 1430, in runtest | |
self.ihook.pytest_pyfunc_call(pyfuncitem=self) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/hooks.py", line 258, in __call__ | |
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 67, in _hookexec | |
return self._inner_hookexec(hook, methods, kwargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/manager.py", line 61, in <lambda> | |
firstresult=hook.spec_opts.get('firstresult'), | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/pluggy/callers.py", line 180, in _multicall | |
res = hook_impl.function(*args) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/_pytest/python.py", line 196, in pytest_pyfunc_call | |
testfunction(**testargs) | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitscheck.py", line 23, in test_valid_file | |
assert fitscheck.main([testfile]) == 0 | |
File "/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitscheck.py", line 211, in main | |
log.warning('{} errors'.format(errors)) | |
Message: '1 errors' | |
Arguments: () | |
1 errors | |
-------------------------------------------------------------------------------------------- Captured log call -------------------------------------------------------------------------------------------- | |
fitscheck.py 195 ERROR EXCEPTION '/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/data/checksum.fits' .. module 'sys' has no attribute 'getrefcount' | |
fitscheck.py 211 WARNING 1 errors | |
__________________________________________________________________________________ TestFitscheck.test_overwrite_invalid ___________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitscheck.TestFitscheck object at 0x000000011c3eec98>, capsys = <_pytest.capture.CaptureFixture object at 0x000000011c3ee288> | |
def test_overwrite_invalid(self, capsys): | |
""" | |
Tests that invalid checksum or datasum are overwriten when the file is | |
saved. | |
""" | |
reffile = self.temp('ref.fits') | |
with fits.open(self.data('tb.fits')) as hdul: | |
> hdul.writeto(reffile, checksum=True) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitscheck.py:56: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________________ TestFITSDiff_script.test_nodiff _____________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitsdiff.TestFITSDiff_script object at 0x000000012c28fc58> | |
def test_nodiff(self): | |
a = np.arange(100).reshape(10, 10) | |
hdu_a = PrimaryHDU(data=a) | |
b = a.copy() | |
hdu_b = PrimaryHDU(data=b) | |
tmp_a = self.temp('testa.fits') | |
tmp_b = self.temp('testb.fits') | |
hdu_a.writeto(tmp_a) | |
hdu_b.writeto(tmp_b) | |
> numdiff = fitsdiff.main([tmp_a, tmp_b]) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py:37: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitsdiff.py:327: in main | |
ignore_blank_cards=opts.ignore_blank_cards) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
____________________________________________________________________________________ TestFITSDiff_script.test_onediff _____________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitsdiff.TestFITSDiff_script object at 0x0000000118c6af70> | |
def test_onediff(self): | |
a = np.arange(100).reshape(10, 10) | |
hdu_a = PrimaryHDU(data=a) | |
b = a.copy() | |
b[1, 0] = 12 | |
hdu_b = PrimaryHDU(data=b) | |
tmp_a = self.temp('testa.fits') | |
tmp_b = self.temp('testb.fits') | |
hdu_a.writeto(tmp_a) | |
hdu_b.writeto(tmp_b) | |
> numdiff = fitsdiff.main([tmp_a, tmp_b]) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py:50: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitsdiff.py:327: in main | |
ignore_blank_cards=opts.ignore_blank_cards) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
____________________________________________________________________________________ TestFITSDiff_script.test_manydiff ____________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitsdiff.TestFITSDiff_script object at 0x0000000112b146e8>, capsys = <_pytest.capture.CaptureFixture object at 0x0000000112b14330> | |
def test_manydiff(self, capsys): | |
a = np.arange(100).reshape(10, 10) | |
hdu_a = PrimaryHDU(data=a) | |
b = a + 1 | |
hdu_b = PrimaryHDU(data=b) | |
tmp_a = self.temp('testa.fits') | |
tmp_b = self.temp('testb.fits') | |
hdu_a.writeto(tmp_a) | |
hdu_b.writeto(tmp_b) | |
> numdiff = fitsdiff.main([tmp_a, tmp_b]) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py:63: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitsdiff.py:327: in main | |
ignore_blank_cards=opts.ignore_blank_cards) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________________ TestFITSDiff_script.test_outputfile ___________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitsdiff.TestFITSDiff_script object at 0x000000012ab2dd00> | |
def test_outputfile(self): | |
a = np.arange(100).reshape(10, 10) | |
hdu_a = PrimaryHDU(data=a) | |
b = a.copy() | |
b[1, 0] = 12 | |
hdu_b = PrimaryHDU(data=b) | |
tmp_a = self.temp('testa.fits') | |
tmp_b = self.temp('testb.fits') | |
hdu_a.writeto(tmp_a) | |
hdu_b.writeto(tmp_b) | |
> numdiff = fitsdiff.main(['-o', self.temp('diff.txt'), tmp_a, tmp_b]) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py:92: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitsdiff.py:327: in main | |
ignore_blank_cards=opts.ignore_blank_cards) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
______________________________________________________________________________________ TestFITSDiff_script.test_atol ______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitsdiff.TestFITSDiff_script object at 0x00000001389b2368> | |
def test_atol(self): | |
a = np.arange(100, dtype=float).reshape(10, 10) | |
hdu_a = PrimaryHDU(data=a) | |
b = a.copy() | |
b[1, 0] = 11 | |
hdu_b = PrimaryHDU(data=b) | |
tmp_a = self.temp('testa.fits') | |
tmp_b = self.temp('testb.fits') | |
hdu_a.writeto(tmp_a) | |
hdu_b.writeto(tmp_b) | |
> numdiff = fitsdiff.main(["-a", "1", tmp_a, tmp_b]) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py:113: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitsdiff.py:327: in main | |
ignore_blank_cards=opts.ignore_blank_cards) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
______________________________________________________________________________________ TestFITSDiff_script.test_rtol ______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitsdiff.TestFITSDiff_script object at 0x0000000114e473d0> | |
def test_rtol(self): | |
a = np.arange(100, dtype=float).reshape(10, 10) | |
hdu_a = PrimaryHDU(data=a) | |
b = a.copy() | |
b[1, 0] = 11 | |
hdu_b = PrimaryHDU(data=b) | |
tmp_a = self.temp('testa.fits') | |
tmp_b = self.temp('testb.fits') | |
hdu_a.writeto(tmp_a) | |
hdu_b.writeto(tmp_b) | |
> numdiff = fitsdiff.main(["-r", "1e-1", tmp_a, tmp_b]) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py:129: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitsdiff.py:327: in main | |
ignore_blank_cards=opts.ignore_blank_cards) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________________ TestFITSDiff_script.test_rtol_diff ____________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitsdiff.TestFITSDiff_script object at 0x0000000138e30640>, capsys = <_pytest.capture.CaptureFixture object at 0x0000000138e302c0> | |
def test_rtol_diff(self, capsys): | |
a = np.arange(100, dtype=float).reshape(10, 10) | |
hdu_a = PrimaryHDU(data=a) | |
b = a.copy() | |
b[1, 0] = 11 | |
hdu_b = PrimaryHDU(data=b) | |
tmp_a = self.temp('testa.fits') | |
tmp_b = self.temp('testb.fits') | |
hdu_a.writeto(tmp_a) | |
hdu_b.writeto(tmp_b) | |
> numdiff = fitsdiff.main(["-r", "1e-2", tmp_a, tmp_b]) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py:142: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitsdiff.py:327: in main | |
ignore_blank_cards=opts.ignore_blank_cards) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
__________________________________________________________________________ TestFITSDiff_script.test_fitsdiff_script_both_d_and_r __________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitsdiff.TestFITSDiff_script object at 0x000000011c3caad8>, capsys = <_pytest.capture.CaptureFixture object at 0x000000011c3ca1e0> | |
def test_fitsdiff_script_both_d_and_r(self, capsys): | |
a = np.arange(100).reshape(10, 10) | |
hdu_a = PrimaryHDU(data=a) | |
b = a.copy() | |
hdu_b = PrimaryHDU(data=b) | |
tmp_a = self.temp('testa.fits') | |
tmp_b = self.temp('testb.fits') | |
hdu_a.writeto(tmp_a) | |
hdu_b.writeto(tmp_b) | |
with catch_warnings(AstropyDeprecationWarning) as warning_lines: | |
> fitsdiff.main(["-r", "1e-4", "-d", "1e-2", tmp_a, tmp_b]) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py:171: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitsdiff.py:327: in main | |
ignore_blank_cards=opts.ignore_blank_cards) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________________ TestFITSDiff_script.test_not_quiet ____________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitsdiff.TestFITSDiff_script object at 0x000000011680a4f0>, capsys = <_pytest.capture.CaptureFixture object at 0x000000011682fb40> | |
def test_not_quiet(self, capsys): | |
a = np.arange(100).reshape(10, 10) | |
hdu_a = PrimaryHDU(data=a) | |
b = a.copy() | |
hdu_b = PrimaryHDU(data=b) | |
tmp_a = self.temp('testa.fits') | |
tmp_b = self.temp('testb.fits') | |
hdu_a.writeto(tmp_a) | |
hdu_b.writeto(tmp_b) | |
> numdiff = fitsdiff.main([tmp_a, tmp_b]) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py:203: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitsdiff.py:327: in main | |
ignore_blank_cards=opts.ignore_blank_cards) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________________ TestFITSDiff_script.test_quiet ______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitsdiff.TestFITSDiff_script object at 0x00000001232ea288>, capsys = <_pytest.capture.CaptureFixture object at 0x00000001232fda98> | |
def test_quiet(self, capsys): | |
a = np.arange(100).reshape(10, 10) | |
hdu_a = PrimaryHDU(data=a) | |
b = a.copy() | |
hdu_b = PrimaryHDU(data=b) | |
tmp_a = self.temp('testa.fits') | |
tmp_b = self.temp('testb.fits') | |
hdu_a.writeto(tmp_a) | |
hdu_b.writeto(tmp_b) | |
> numdiff = fitsdiff.main(["-q", tmp_a, tmp_b]) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py:225: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/scripts/fitsdiff.py:327: in main | |
ignore_blank_cards=opts.ignore_blank_cards) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/diff.py:323: in __init__ | |
a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
______________________________________________________________________________________ TestFITSDiff_script.test_path ______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_fitsdiff.TestFITSDiff_script object at 0x0000000114ee6368>, capsys = <_pytest.capture.CaptureFixture object at 0x0000000114ee71d8> | |
def test_path(self, capsys): | |
os.mkdir(self.temp('sub/')) | |
tmp_b = self.temp('sub/ascii.fits') | |
tmp_g = self.temp('sub/group.fits') | |
tmp_h = self.data('group.fits') | |
with hdulist.fitsopen(tmp_h) as hdu_b: | |
> hdu_b.writeto(tmp_g) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_fitsdiff.py:238: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
______________________________________________________________________________________ TestGroupsFunctions.test_open ______________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_groups.TestGroupsFunctions object at 0x00000001224bc448> | |
def test_open(self): | |
with fits.open(self.data('random_groups.fits')) as hdul: | |
assert isinstance(hdul[0], fits.GroupsHDU) | |
naxes = (3, 1, 128, 1, 1) | |
parameters = ['UU', 'VV', 'WW', 'BASELINE', 'DATE'] | |
info = [(0, 'PRIMARY', 1, 'GroupsHDU', 147, naxes, 'float32', | |
'3 Groups 5 Parameters')] | |
assert hdul.info(output=False) == info | |
ghdu = hdul[0] | |
assert ghdu.parnames == parameters | |
assert list(ghdu.data.dtype.names) == parameters + ['DATA'] | |
assert isinstance(ghdu.data, fits.GroupData) | |
# The data should be equal to the number of groups | |
assert ghdu.header['GCOUNT'] == len(ghdu.data) | |
assert ghdu.data.data.shape == (len(ghdu.data),) + naxes[::-1] | |
assert ghdu.data.parnames == parameters | |
assert isinstance(ghdu.data[0], fits.Group) | |
assert len(ghdu.data[0]) == len(parameters) + 1 | |
assert ghdu.data[0].data.shape == naxes[::-1] | |
> assert ghdu.data[0].parnames == parameters | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_groups.py:37: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________ TestGroupsFunctions.test_random_groups_data_update ____________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_groups.TestGroupsFunctions object at 0x000000011a07ef38> | |
def test_random_groups_data_update(self): | |
""" | |
Regression test for https://github.com/astropy/astropy/issues/3730 and | |
for https://github.com/spacetelescope/PyFITS/issues/102 | |
""" | |
self.copy_file('random_groups.fits') | |
with fits.open(self.temp('random_groups.fits'), mode='update') as h: | |
> h[0].data['UU'] = 0.42 | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_groups.py:70: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
______________________________________________________________________________ TestGroupsFunctions.test_parnames_round_trip _______________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_groups.TestGroupsFunctions object at 0x0000000121954a68> | |
def test_parnames_round_trip(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/130 | |
Ensures that opening a random groups file in update mode or writing it | |
to a new file does not cause any change to the parameter names. | |
""" | |
# Because this test tries to update the random_groups.fits file, let's | |
# make a copy of it first (so that the file doesn't actually get | |
# modified in the off chance that the test fails | |
self.copy_file('random_groups.fits') | |
parameters = ['UU', 'VV', 'WW', 'BASELINE', 'DATE'] | |
with fits.open(self.temp('random_groups.fits'), mode='update') as h: | |
assert h[0].parnames == parameters | |
h.flush() | |
# Open again just in read-only mode to ensure the parnames didn't | |
# change | |
with fits.open(self.temp('random_groups.fits')) as h: | |
assert h[0].parnames == parameters | |
> h.writeto(self.temp('test.fits')) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_groups.py:96: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
________________________________________________________________________________ TestGroupsFunctions.test_groupdata_slice _________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_groups.TestGroupsFunctions object at 0x0000000136299980> | |
def test_groupdata_slice(self): | |
""" | |
A simple test to ensure that slicing GroupData returns a new, smaller | |
GroupData object, as is the case with a normal FITS_rec. This is a | |
regression test for an as-of-yet unreported issue where slicing | |
GroupData returned a single Group record. | |
""" | |
with fits.open(self.data('random_groups.fits')) as hdul: | |
s = hdul[0].data[1:] | |
assert isinstance(s, fits.GroupData) | |
assert len(s) == 2 | |
> assert hdul[0].data.parnames == s.parnames | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_groups.py:113: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
__________________________________________________________________________________ TestGroupsFunctions.test_group_slice ___________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_groups.TestGroupsFunctions object at 0x00000001220ef210> | |
def test_group_slice(self): | |
""" | |
Tests basic slicing a single group record. | |
""" | |
# A very basic slice test | |
with fits.open(self.data('random_groups.fits')) as hdul: | |
g = hdul[0].data[0] | |
s = g[2:4] | |
assert len(s) == 2 | |
assert s[0] == g[2] | |
assert s[-1] == g[-3] | |
s = g[::-1] | |
assert len(s) == 6 | |
assert (s[0] == g[-1]).all() | |
assert s[-1] == g[0] | |
s = g[::2] | |
assert len(s) == 3 | |
assert s[0] == g[0] | |
assert s[1] == g[2] | |
> assert s[2] == g[4] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_groups.py:135: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
________________________________________________________________________________ TestGroupsFunctions.test_create_groupdata ________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_groups.TestGroupsFunctions object at 0x0000000120d27168> | |
def test_create_groupdata(self): | |
""" | |
Basic test for creating GroupData from scratch. | |
""" | |
imdata = np.arange(100.0) | |
imdata.shape = (10, 1, 1, 2, 5) | |
pdata1 = np.arange(10, dtype=np.float32) + 0.1 | |
pdata2 = 42.0 | |
x = fits.hdu.groups.GroupData(imdata, parnames=['abc', 'xyz'], | |
pardata=[pdata1, pdata2], bitpix=-32) | |
assert x.parnames == ['abc', 'xyz'] | |
assert (x.par('abc') == pdata1).all() | |
assert (x.par('xyz') == ([pdata2] * len(x))).all() | |
assert (x.data == imdata).all() | |
# Test putting the data into a GroupsHDU and round-tripping it | |
ghdu = fits.GroupsHDU(data=x) | |
ghdu.writeto(self.temp('test.fits')) | |
with fits.open(self.temp('test.fits')) as h: | |
hdr = h[0].header | |
assert hdr['GCOUNT'] == 10 | |
assert hdr['PCOUNT'] == 2 | |
assert hdr['NAXIS'] == 5 | |
assert hdr['NAXIS1'] == 0 | |
assert hdr['NAXIS2'] == 5 | |
assert hdr['NAXIS3'] == 2 | |
assert hdr['NAXIS4'] == 1 | |
assert hdr['NAXIS5'] == 1 | |
assert h[0].data.parnames == ['abc', 'xyz'] | |
> assert comparerecords(h[0].data, x) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_groups.py:168: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
________________________________________________________________________________ TestHDUListFunctions.test_update_filelike ________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_hdulist.TestHDUListFunctions object at 0x00000001396259f0> | |
def test_update_filelike(self): | |
"""Test opening a file-like object in update mode and resizing the | |
HDU. | |
""" | |
sf = io.BytesIO() | |
arr = np.zeros((100, 100)) | |
hdu = fits.PrimaryHDU(data=arr) | |
hdu.writeto(sf) | |
sf.seek(0) | |
arr = np.zeros((200, 200)) | |
hdul = fits.open(sf, mode='update') | |
hdul[0].data = arr | |
> hdul.flush() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:409: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:827: in flush | |
func = make_function_with_signature(func, name=name, **wrapped_args) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/util.py:233: in wrapped | |
func(*args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:770: in flush | |
self._flush_update() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1186: in _flush_update | |
self._flush_resize() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1297: in _flush_resize | |
hdulist.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
____________________________________________________________________________ TestHDUListFunctions.test_replace_memmaped_array _____________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_hdulist.TestHDUListFunctions object at 0x0000000129305de0> | |
def test_replace_memmaped_array(self): | |
# Copy the original before we modify it | |
hdul = fits.open(self.data('test0.fits')) | |
hdul.writeto(self.temp('temp.fits')) | |
hdul = fits.open(self.temp('temp.fits'), mode='update', memmap=True) | |
old_data = hdul[1].data.copy() | |
hdul[1].data = hdul[1].data + 1 | |
> hdul.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:507: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_______________________________________________________________________ TestHDUListFunctions.test_open_file_with_bad_header_padding _______________________________________________________________________ | |
self = <astropy.io.fits.tests.test_hdulist.TestHDUListFunctions object at 0x0000000136c41c58> | |
def test_open_file_with_bad_header_padding(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/136 | |
Open files with nulls for header block padding instead of spaces. | |
""" | |
a = np.arange(100).reshape(10, 10) | |
hdu = fits.PrimaryHDU(data=a) | |
hdu.writeto(self.temp('temp.fits')) | |
# Figure out where the header padding begins and fill it with nulls | |
end_card_pos = str(hdu.header).index('END' + ' ' * 77) | |
padding_start = end_card_pos + 80 | |
padding_len = 2880 - padding_start | |
with open(self.temp('temp.fits'), 'r+b') as f: | |
f.seek(padding_start) | |
f.write('\0'.encode('ascii') * padding_len) | |
with catch_warnings(AstropyUserWarning) as w: | |
with fits.open(self.temp('temp.fits')) as hdul: | |
> assert (hdul[0].data == a).all() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:549: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________ TestHDUListFunctions.test_update_with_truncated_header __________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_hdulist.TestHDUListFunctions object at 0x0000000129d2c4f0> | |
def test_update_with_truncated_header(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/148 | |
Test that saving an update where the header is shorter than the | |
original header doesn't leave a stump from the old header in the file. | |
""" | |
data = np.arange(100) | |
hdu = fits.PrimaryHDU(data=data) | |
idx = 1 | |
while len(hdu.header) < 34: | |
hdu.header['TEST{}'.format(idx)] = idx | |
idx += 1 | |
hdu.writeto(self.temp('temp.fits'), checksum=True) | |
with fits.open(self.temp('temp.fits'), mode='update') as hdul: | |
# Modify the header, forcing it to be rewritten | |
> hdul[0].header['TEST1'] = 2 | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:574: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________ TestHDUListFunctions.test_update_resized_header _____________________________________________________________________________ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011cf054b0>], output_verify = 'exception', verbose = False, closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
> self.flush(output_verify=output_verify, verbose=verbose) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:891: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011cf054b0>], output_verify = 'exception', verbose = False | |
> func = make_function_with_signature(func, name=name, **wrapped_args) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:827: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ([<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011cf054b0>],), kwargs = {'output_verify': 'exception', 'verbose': False} | |
curr_thread = <_MainThread(MainThread, started 140736100262784)>, single_thread = True, SigintHandler = <class 'astropy.io.fits.util.ignore_sigint.<locals>.wrapped.<locals>.SigintHandler'> | |
sigint_handler = <astropy.io.fits.util.ignore_sigint.<locals>.wrapped.<locals>.SigintHandler object at 0x000000011acd2a30>, old_handler = <built-in function default_int_handler> | |
@wraps(func) | |
def wrapped(*args, **kwargs): | |
# Get the name of the current thread and determine if this is a single | |
# threaded application | |
curr_thread = threading.currentThread() | |
single_thread = (threading.activeCount() == 1 and | |
curr_thread.getName() == 'MainThread') | |
class SigintHandler: | |
def __init__(self): | |
self.sigint_received = False | |
def __call__(self, signum, frame): | |
warnings.warn('KeyboardInterrupt ignored until {} is ' | |
'complete!'.format(func.__name__), | |
AstropyUserWarning) | |
self.sigint_received = True | |
sigint_handler = SigintHandler() | |
# Define new signal interput handler | |
if single_thread: | |
# Install new handler | |
old_handler = signal.signal(signal.SIGINT, sigint_handler) | |
try: | |
> func(*args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/util.py:233: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011cf054b0>], output_verify = 'exception', verbose = False | |
@ignore_sigint | |
def flush(self, output_verify='fix', verbose=False): | |
""" | |
Force a write of the `HDUList` back to the file (for append and | |
update modes only). | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print verbose messages | |
""" | |
if self._file.mode not in ('append', 'update', 'ostream'): | |
warnings.warn("Flush for '{}' mode is not supported." | |
.format(self._file.mode), AstropyUserWarning) | |
return | |
if self._save_backup and self._file.mode in ('append', 'update'): | |
filename = self._file.name | |
if os.path.exists(filename): | |
# The the file doesn't actually exist anymore for some reason | |
# then there's no point in trying to make a backup | |
backup = filename + '.bak' | |
idx = 1 | |
while os.path.exists(backup): | |
backup = filename + '.bak.' + str(idx) | |
idx += 1 | |
warnings.warn('Saving a backup of {} to {}.'.format( | |
filename, backup), AstropyUserWarning) | |
try: | |
shutil.copy(filename, backup) | |
except OSError as exc: | |
raise OSError('Failed to save backup to destination {}: ' | |
'{}'.format(filename, exc)) | |
self.verify(option=output_verify) | |
if self._file.mode in ('append', 'ostream'): | |
for hdu in self: | |
if verbose: | |
try: | |
extver = str(hdu._header['extver']) | |
except KeyError: | |
extver = '' | |
# only append HDU's which are "new" | |
if hdu._new: | |
hdu._prewriteto(checksum=hdu._output_checksum) | |
with _free_space_check(self): | |
hdu._writeto(self._file) | |
if verbose: | |
print('append HDU', hdu.name, extver) | |
hdu._new = False | |
hdu._postwriteto() | |
elif self._file.mode == 'update': | |
> self._flush_update() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:770: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011cf054b0>] | |
def _flush_update(self): | |
"""Implements flushing changes to a file in update mode.""" | |
for hdu in self: | |
# Need to all _prewriteto() for each HDU first to determine if | |
# resizing will be necessary | |
hdu._prewriteto(checksum=hdu._output_checksum, inplace=True) | |
try: | |
self._wasresized() | |
# if the HDUList is resized, need to write out the entire contents of | |
# the hdulist to the file. | |
if self._resize or self._file.compression: | |
> self._flush_resize() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1186: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011cf054b0>] | |
def _flush_resize(self): | |
""" | |
Implements flushing changes in update mode when parts of one or more HDU | |
need to be resized. | |
""" | |
old_name = self._file.name | |
old_memmap = self._file.memmap | |
name = _tmp_name(old_name) | |
if not self._file.file_like: | |
old_mode = os.stat(old_name).st_mode | |
# The underlying file is an actual file object. The HDUList is | |
# resized, so we need to write it to a tmp file, delete the | |
# original file, and rename the tmp file to the original file. | |
if self._file.compression == 'gzip': | |
new_file = gzip.GzipFile(name, mode='ab+') | |
elif self._file.compression == 'bzip2': | |
new_file = bz2.BZ2File(name, mode='w') | |
else: | |
new_file = name | |
with self.fromfile(new_file, mode='append') as hdulist: | |
for hdu in self: | |
hdu._writeto(hdulist._file, inplace=True, copy=True) | |
if sys.platform.startswith('win'): | |
# Collect a list of open mmaps to the data; this well be | |
# used later. See below. | |
mmaps = [(idx, _get_array_mmap(hdu.data), hdu.data) | |
for idx, hdu in enumerate(self) if hdu._has_data] | |
hdulist._file.close() | |
> self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1232: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>> | |
def close(self): | |
""" | |
Close the 'physical' FITS file. | |
""" | |
if hasattr(self._file, 'close'): | |
self._file.close() | |
> self._maybe_close_mmap() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_hdulist.TestHDUListFunctions object at 0x000000011bc69d70> | |
@pytest.mark.xfail(platform.system() == 'Windows' and not NUMPY_LT_1_12, | |
reason='https://github.com/astropy/astropy/issues/5797') | |
def test_update_resized_header(self): | |
""" | |
Test saving updates to a file where the header is one block smaller | |
than before, and in the case where the heade ris one block larger than | |
before. | |
""" | |
data = np.arange(100) | |
hdu = fits.PrimaryHDU(data=data) | |
idx = 1 | |
while len(str(hdu.header)) <= 2880: | |
hdu.header['TEST{}'.format(idx)] = idx | |
idx += 1 | |
orig_header = hdu.header.copy() | |
hdu.writeto(self.temp('temp.fits')) | |
with fits.open(self.temp('temp.fits'), mode='update') as hdul: | |
while len(str(hdul[0].header)) > 2880: | |
> del hdul[0].header[-1] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:599: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
____________________________________________________________________________ TestHDUListFunctions.test_update_resized_header2 _____________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_hdulist.TestHDUListFunctions object at 0x000000012069afe0> | |
def test_update_resized_header2(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/150 | |
This is similar to test_update_resized_header, but specifically tests a | |
case of multiple consecutive flush() calls on the same HDUList object, | |
where each flush() requires a resize. | |
""" | |
data1 = np.arange(100) | |
data2 = np.arange(100) + 100 | |
phdu = fits.PrimaryHDU(data=data1) | |
hdu = fits.ImageHDU(data=data2) | |
phdu.writeto(self.temp('temp.fits')) | |
with fits.open(self.temp('temp.fits'), mode='append') as hdul: | |
hdul.append(hdu) | |
with fits.open(self.temp('temp.fits'), mode='update') as hdul: | |
idx = 1 | |
while len(str(hdul[0].header)) <= 2880 * 2: | |
hdul[0].header['TEST{}'.format(idx)] = idx | |
idx += 1 | |
> hdul.flush() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:642: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000120691408>], output_verify = 'fix', verbose = False | |
> func = make_function_with_signature(func, name=name, **wrapped_args) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:827: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ([<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000120691408>],), kwargs = {'output_verify': 'fix', 'verbose': False} | |
curr_thread = <_MainThread(MainThread, started 140736100262784)>, single_thread = True, SigintHandler = <class 'astropy.io.fits.util.ignore_sigint.<locals>.wrapped.<locals>.SigintHandler'> | |
sigint_handler = <astropy.io.fits.util.ignore_sigint.<locals>.wrapped.<locals>.SigintHandler object at 0x0000000120691360>, old_handler = <built-in function default_int_handler> | |
@wraps(func) | |
def wrapped(*args, **kwargs): | |
# Get the name of the current thread and determine if this is a single | |
# threaded application | |
curr_thread = threading.currentThread() | |
single_thread = (threading.activeCount() == 1 and | |
curr_thread.getName() == 'MainThread') | |
class SigintHandler: | |
def __init__(self): | |
self.sigint_received = False | |
def __call__(self, signum, frame): | |
warnings.warn('KeyboardInterrupt ignored until {} is ' | |
'complete!'.format(func.__name__), | |
AstropyUserWarning) | |
self.sigint_received = True | |
sigint_handler = SigintHandler() | |
# Define new signal interput handler | |
if single_thread: | |
# Install new handler | |
old_handler = signal.signal(signal.SIGINT, sigint_handler) | |
try: | |
> func(*args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/util.py:233: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000120691408>], output_verify = 'fix', verbose = False | |
@ignore_sigint | |
def flush(self, output_verify='fix', verbose=False): | |
""" | |
Force a write of the `HDUList` back to the file (for append and | |
update modes only). | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print verbose messages | |
""" | |
if self._file.mode not in ('append', 'update', 'ostream'): | |
warnings.warn("Flush for '{}' mode is not supported." | |
.format(self._file.mode), AstropyUserWarning) | |
return | |
if self._save_backup and self._file.mode in ('append', 'update'): | |
filename = self._file.name | |
if os.path.exists(filename): | |
# The the file doesn't actually exist anymore for some reason | |
# then there's no point in trying to make a backup | |
backup = filename + '.bak' | |
idx = 1 | |
while os.path.exists(backup): | |
backup = filename + '.bak.' + str(idx) | |
idx += 1 | |
warnings.warn('Saving a backup of {} to {}.'.format( | |
filename, backup), AstropyUserWarning) | |
try: | |
shutil.copy(filename, backup) | |
except OSError as exc: | |
raise OSError('Failed to save backup to destination {}: ' | |
'{}'.format(filename, exc)) | |
self.verify(option=output_verify) | |
if self._file.mode in ('append', 'ostream'): | |
for hdu in self: | |
if verbose: | |
try: | |
extver = str(hdu._header['extver']) | |
except KeyError: | |
extver = '' | |
# only append HDU's which are "new" | |
if hdu._new: | |
hdu._prewriteto(checksum=hdu._output_checksum) | |
with _free_space_check(self): | |
hdu._writeto(self._file) | |
if verbose: | |
print('append HDU', hdu.name, extver) | |
hdu._new = False | |
hdu._postwriteto() | |
elif self._file.mode == 'update': | |
> self._flush_update() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:770: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000120691408>] | |
def _flush_update(self): | |
"""Implements flushing changes to a file in update mode.""" | |
for hdu in self: | |
# Need to all _prewriteto() for each HDU first to determine if | |
# resizing will be necessary | |
hdu._prewriteto(checksum=hdu._output_checksum, inplace=True) | |
try: | |
self._wasresized() | |
# if the HDUList is resized, need to write out the entire contents of | |
# the hdulist to the file. | |
if self._resize or self._file.compression: | |
> self._flush_resize() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1186: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000120691408>] | |
def _flush_resize(self): | |
""" | |
Implements flushing changes in update mode when parts of one or more HDU | |
need to be resized. | |
""" | |
old_name = self._file.name | |
old_memmap = self._file.memmap | |
name = _tmp_name(old_name) | |
if not self._file.file_like: | |
old_mode = os.stat(old_name).st_mode | |
# The underlying file is an actual file object. The HDUList is | |
# resized, so we need to write it to a tmp file, delete the | |
# original file, and rename the tmp file to the original file. | |
if self._file.compression == 'gzip': | |
new_file = gzip.GzipFile(name, mode='ab+') | |
elif self._file.compression == 'bzip2': | |
new_file = bz2.BZ2File(name, mode='w') | |
else: | |
new_file = name | |
with self.fromfile(new_file, mode='append') as hdulist: | |
for hdu in self: | |
hdu._writeto(hdulist._file, inplace=True, copy=True) | |
if sys.platform.startswith('win'): | |
# Collect a list of open mmaps to the data; this well be | |
# used later. See below. | |
mmaps = [(idx, _get_array_mmap(hdu.data), hdu.data) | |
for idx, hdu in enumerate(self) if hdu._has_data] | |
hdulist._file.close() | |
> self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1232: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>> | |
def close(self): | |
""" | |
Close the 'physical' FITS file. | |
""" | |
if hasattr(self._file, 'close'): | |
self._file.close() | |
> self._maybe_close_mmap() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000120691408>], output_verify = 'exception', verbose = False | |
closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
> self.flush(output_verify=output_verify, verbose=verbose) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:891: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000120691408>], output_verify = 'exception', verbose = False | |
> func = make_function_with_signature(func, name=name, **wrapped_args) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:827: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ([<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000120691408>],) | |
kwargs = {'output_verify': 'exception', 'verbose': False}, curr_thread = <_MainThread(MainThread, started 140736100262784)>, single_thread = True | |
SigintHandler = <class 'astropy.io.fits.util.ignore_sigint.<locals>.wrapped.<locals>.SigintHandler'> | |
sigint_handler = <astropy.io.fits.util.ignore_sigint.<locals>.wrapped.<locals>.SigintHandler object at 0x00000001206919f0>, old_handler = <built-in function default_int_handler> | |
@wraps(func) | |
def wrapped(*args, **kwargs): | |
# Get the name of the current thread and determine if this is a single | |
# threaded application | |
curr_thread = threading.currentThread() | |
single_thread = (threading.activeCount() == 1 and | |
curr_thread.getName() == 'MainThread') | |
class SigintHandler: | |
def __init__(self): | |
self.sigint_received = False | |
def __call__(self, signum, frame): | |
warnings.warn('KeyboardInterrupt ignored until {} is ' | |
'complete!'.format(func.__name__), | |
AstropyUserWarning) | |
self.sigint_received = True | |
sigint_handler = SigintHandler() | |
# Define new signal interput handler | |
if single_thread: | |
# Install new handler | |
old_handler = signal.signal(signal.SIGINT, sigint_handler) | |
try: | |
> func(*args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/util.py:233: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000120691408>], output_verify = 'exception', verbose = False | |
@ignore_sigint | |
def flush(self, output_verify='fix', verbose=False): | |
""" | |
Force a write of the `HDUList` back to the file (for append and | |
update modes only). | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print verbose messages | |
""" | |
if self._file.mode not in ('append', 'update', 'ostream'): | |
warnings.warn("Flush for '{}' mode is not supported." | |
.format(self._file.mode), AstropyUserWarning) | |
return | |
if self._save_backup and self._file.mode in ('append', 'update'): | |
filename = self._file.name | |
if os.path.exists(filename): | |
# The the file doesn't actually exist anymore for some reason | |
# then there's no point in trying to make a backup | |
backup = filename + '.bak' | |
idx = 1 | |
while os.path.exists(backup): | |
backup = filename + '.bak.' + str(idx) | |
idx += 1 | |
warnings.warn('Saving a backup of {} to {}.'.format( | |
filename, backup), AstropyUserWarning) | |
try: | |
shutil.copy(filename, backup) | |
except OSError as exc: | |
raise OSError('Failed to save backup to destination {}: ' | |
'{}'.format(filename, exc)) | |
self.verify(option=output_verify) | |
if self._file.mode in ('append', 'ostream'): | |
for hdu in self: | |
if verbose: | |
try: | |
extver = str(hdu._header['extver']) | |
except KeyError: | |
extver = '' | |
# only append HDU's which are "new" | |
if hdu._new: | |
hdu._prewriteto(checksum=hdu._output_checksum) | |
with _free_space_check(self): | |
hdu._writeto(self._file) | |
if verbose: | |
print('append HDU', hdu.name, extver) | |
hdu._new = False | |
hdu._postwriteto() | |
elif self._file.mode == 'update': | |
> self._flush_update() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:770: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000120691408>] | |
def _flush_update(self): | |
"""Implements flushing changes to a file in update mode.""" | |
for hdu in self: | |
# Need to all _prewriteto() for each HDU first to determine if | |
# resizing will be necessary | |
hdu._prewriteto(checksum=hdu._output_checksum, inplace=True) | |
try: | |
self._wasresized() | |
# if the HDUList is resized, need to write out the entire contents of | |
# the hdulist to the file. | |
if self._resize or self._file.compression: | |
> self._flush_resize() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1186: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, <astropy.io.fits.hdu.image.ImageHDU object at 0x0000000120691408>] | |
def _flush_resize(self): | |
""" | |
Implements flushing changes in update mode when parts of one or more HDU | |
need to be resized. | |
""" | |
old_name = self._file.name | |
old_memmap = self._file.memmap | |
name = _tmp_name(old_name) | |
if not self._file.file_like: | |
old_mode = os.stat(old_name).st_mode | |
# The underlying file is an actual file object. The HDUList is | |
# resized, so we need to write it to a tmp file, delete the | |
# original file, and rename the tmp file to the original file. | |
if self._file.compression == 'gzip': | |
new_file = gzip.GzipFile(name, mode='ab+') | |
elif self._file.compression == 'bzip2': | |
new_file = bz2.BZ2File(name, mode='w') | |
else: | |
new_file = name | |
with self.fromfile(new_file, mode='append') as hdulist: | |
for hdu in self: | |
> hdu._writeto(hdulist._file, inplace=True, copy=True) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1224: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, fileobj = <astropy.io.fits.file._File <_io.FileIO [closed]>>, inplace = True, copy = True | |
def _writeto(self, fileobj, inplace=False, copy=False): | |
try: | |
dirname = os.path.dirname(fileobj._file.name) | |
except AttributeError: | |
dirname = None | |
with _free_space_check(self, dirname): | |
> self._writeto_internal(fileobj, inplace, copy) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/base.py:642: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000012069bd38>, fileobj = <astropy.io.fits.file._File <_io.FileIO [closed]>>, inplace = True, copy = True | |
def _writeto_internal(self, fileobj, inplace, copy): | |
# For now fileobj is assumed to be a _File object | |
if not inplace or self._new: | |
header_offset, _ = self._writeheader(fileobj) | |
data_offset, data_size = self._writedata(fileobj) | |
# Set the various data location attributes on newly-written HDUs | |
if self._new: | |
self._header_offset = header_offset | |
self._data_offset = data_offset | |
self._data_size = data_size | |
return | |
hdrloc = self._header_offset | |
hdrsize = self._data_offset - self._header_offset | |
datloc = self._data_offset | |
datsize = self._data_size | |
if self._header._modified: | |
# Seek to the original header location in the file | |
> self._file.seek(hdrloc) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/base.py:664: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, offset = 0, whence = 0 | |
def seek(self, offset, whence=0): | |
if not hasattr(self._file, 'seek'): | |
return | |
> self._file.seek(offset, whence) | |
E ValueError: I/O operation on closed file | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:350: ValueError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_hdulist.TestHDUListFunctions object at 0x000000012069afe0> | |
def test_update_resized_header2(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/150 | |
This is similar to test_update_resized_header, but specifically tests a | |
case of multiple consecutive flush() calls on the same HDUList object, | |
where each flush() requires a resize. | |
""" | |
data1 = np.arange(100) | |
data2 = np.arange(100) + 100 | |
phdu = fits.PrimaryHDU(data=data1) | |
hdu = fits.ImageHDU(data=data2) | |
phdu.writeto(self.temp('temp.fits')) | |
with fits.open(self.temp('temp.fits'), mode='append') as hdul: | |
hdul.append(hdu) | |
with fits.open(self.temp('temp.fits'), mode='update') as hdul: | |
idx = 1 | |
while len(str(hdul[0].header)) <= 2880 * 2: | |
hdul[0].header['TEST{}'.format(idx)] = idx | |
idx += 1 | |
hdul.flush() | |
> hdul.append(hdu) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:643: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
________________________________________________________________________________ TestHDUListFunctions.test_hdul_fromstring ________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_hdulist.TestHDUListFunctions object at 0x0000000136c3d440> | |
@ignore_warnings() | |
def test_hdul_fromstring(self): | |
""" | |
Test creating the HDUList structure in memory from a string containing | |
an entire FITS file. This is similar to test_hdu_fromstring but for an | |
entire multi-extension FITS file at once. | |
""" | |
# Tests HDUList.fromstring for all of Astropy's built in test files | |
def test_fromstring(filename): | |
with fits.open(filename) as hdul: | |
orig_info = hdul.info(output=False) | |
with open(filename, 'rb') as f: | |
dat = f.read() | |
hdul2 = fits.HDUList.fromstring(dat) | |
assert orig_info == hdul2.info(output=False) | |
for idx in range(len(hdul)): | |
assert hdul[idx].header == hdul2[idx].header | |
if hdul[idx].data is None or hdul2[idx].data is None: | |
assert hdul[idx].data == hdul2[idx].data | |
elif (hdul[idx].data.dtype.fields and | |
hdul2[idx].data.dtype.fields): | |
# Compare tables | |
for n in hdul[idx].data.names: | |
c1 = hdul[idx].data[n] | |
c2 = hdul2[idx].data[n] | |
assert (c1 == c2).all() | |
elif (any(dim == 0 for dim in hdul[idx].data.shape) or | |
any(dim == 0 for dim in hdul2[idx].data.shape)): | |
# For some reason some combinations of Python and Numpy | |
# on Windows result in MemoryErrors when trying to work | |
# on memmap arrays with more than one dimension but | |
# some dimensions of size zero, so include a special | |
# case for that | |
return hdul[idx].data.shape == hdul2[idx].data.shape | |
else: | |
np.testing.assert_array_equal(hdul[idx].data, | |
hdul2[idx].data) | |
for filename in glob.glob(os.path.join(self.data_dir, '*.fits')): | |
if sys.platform == 'win32' and filename == 'zerowidth.fits': | |
# Running this test on this file causes a crash in some | |
# versions of Numpy on Windows. See ticket: | |
# https://aeon.stsci.edu/ssb/trac/pyfits/ticket/174 | |
continue | |
elif filename.endswith('variable_length_table.fits'): | |
# Comparing variable length arrays is non-trivial and thus | |
# skipped at this point. | |
# TODO: That's probably possible, so one could make it work. | |
continue | |
> test_fromstring(filename) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:703: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:690: in test_fromstring | |
hdul2[idx].data) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
__________________________________________________________________________________ TestHDUListFunctions.test_save_backup __________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_hdulist.TestHDUListFunctions object at 0x0000000121a32fa8> | |
def test_save_backup(self): | |
"""Test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/121 | |
Save backup of file before flushing changes. | |
""" | |
self.copy_file('scale.fits') | |
with ignore_warnings(): | |
with fits.open(self.temp('scale.fits'), mode='update', | |
save_backup=True) as hdul: | |
# Make some changes to the original file to force its header | |
# and data to be rewritten | |
hdul[0].header['TEST'] = 'TEST' | |
> hdul[0].data[0] = 0 | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:722: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_______________________________________________________________________________ TestHDUListFunctions.test_replace_mmap_data _______________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_hdulist.TestHDUListFunctions object at 0x000000011ed12218> | |
def test_replace_mmap_data(self): | |
"""Regression test for | |
https://github.com/spacetelescope/PyFITS/issues/25 | |
Replacing the mmap'd data of one file with mmap'd data from a | |
different file should work. | |
""" | |
arr_a = np.arange(10) | |
arr_b = arr_a * 2 | |
def test(mmap_a, mmap_b): | |
hdu_a = fits.PrimaryHDU(data=arr_a) | |
hdu_a.writeto(self.temp('test_a.fits'), overwrite=True) | |
hdu_b = fits.PrimaryHDU(data=arr_b) | |
hdu_b.writeto(self.temp('test_b.fits'), overwrite=True) | |
hdul_a = fits.open(self.temp('test_a.fits'), mode='update', | |
memmap=mmap_a) | |
hdul_b = fits.open(self.temp('test_b.fits'), memmap=mmap_b) | |
hdul_a[0].data = hdul_b[0].data | |
hdul_a.close() | |
hdul_b.close() | |
hdul_a = fits.open(self.temp('test_a.fits')) | |
assert np.all(hdul_a[0].data == arr_b) | |
with ignore_warnings(): | |
> test(True, True) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:771: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:763: in test | |
hdul_a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:898: in close | |
hdu._close(closed=closed) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/base.py:716: in _close | |
del self.data | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:732: in __delete__ | |
self.fdel(obj) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.hdu.image.PrimaryHDU object at 0x000000011ecfa218> | |
def data(self): | |
# The deleter | |
if self._file is not None and self._data_loaded: | |
> data_refcount = sys.getrefcount(self.data) | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/base.py:106: AttributeError | |
______________________________________________________________________________ TestHDUListFunctions.test_replace_mmap_data_2 ______________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_hdulist.TestHDUListFunctions object at 0x0000000137d3f750> | |
def test_replace_mmap_data_2(self): | |
"""Regression test for | |
https://github.com/spacetelescope/PyFITS/issues/25 | |
Replacing the mmap'd data of one file with mmap'd data from a | |
different file should work. Like test_replace_mmap_data but with | |
table data instead of image data. | |
""" | |
arr_a = np.arange(10) | |
arr_b = arr_a * 2 | |
def test(mmap_a, mmap_b): | |
col_a = fits.Column(name='a', format='J', array=arr_a) | |
col_b = fits.Column(name='b', format='J', array=arr_b) | |
hdu_a = fits.BinTableHDU.from_columns([col_a]) | |
hdu_a.writeto(self.temp('test_a.fits'), overwrite=True) | |
hdu_b = fits.BinTableHDU.from_columns([col_b]) | |
hdu_b.writeto(self.temp('test_b.fits'), overwrite=True) | |
hdul_a = fits.open(self.temp('test_a.fits'), mode='update', | |
memmap=mmap_a) | |
hdul_b = fits.open(self.temp('test_b.fits'), memmap=mmap_b) | |
hdul_a[1].data = hdul_b[1].data | |
hdul_a.close() | |
hdul_b.close() | |
hdul_a = fits.open(self.temp('test_a.fits')) | |
assert 'b' in hdul_a[1].columns.names | |
assert 'a' not in hdul_a[1].columns.names | |
assert np.all(hdul_a[1].data['b'] == arr_b) | |
with ignore_warnings(): | |
> test(True, True) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:813: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_hdulist.py:803: in test | |
hdul_a.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:898: in close | |
hdu._close(closed=closed) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/base.py:716: in _close | |
del self.data | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:732: in __delete__ | |
self.fdel(obj) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.hdu.table.BinTableHDU object at 0x00000001202c91d8> | |
def data(self): | |
# The deleter | |
if self._file is not None and self._data_loaded: | |
> data_refcount = sys.getrefcount(self.data) | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/base.py:106: AttributeError | |
_________________________________________________________________________________ TestHeaderFunctions.test_update_comment _________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_header.TestHeaderFunctions object at 0x0000000135a7cad8> | |
def test_update_comment(self): | |
hdul = fits.open(self.data('arange.fits')) | |
hdul[0].header.update({'FOO': ('BAR', 'BAZ')}) | |
assert hdul[0].header['FOO'] == 'BAR' | |
assert hdul[0].header.comments['FOO'] == 'BAZ' | |
with pytest.raises(ValueError): | |
hdul[0].header.update({'FOO2': ('BAR', 'BAZ', 'EXTRA')}) | |
hdul.writeto(self.temp('test.fits')) | |
> hdul.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_header.py:230: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________________ TestHeaderFunctions.test_end_in_comment _________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_header.TestHeaderFunctions object at 0x0000000136571248> | |
def test_end_in_comment(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/142 | |
Tests a case where the comment of a card ends with END, and is followed | |
by several blank cards. | |
""" | |
data = np.arange(100).reshape(10, 10) | |
hdu = fits.PrimaryHDU(data=data) | |
hdu.header['TESTKW'] = ('Test val', 'This is the END') | |
# Add a couple blanks after the END string | |
hdu.header.append() | |
hdu.header.append() | |
hdu.writeto(self.temp('test.fits')) | |
with fits.open(self.temp('test.fits'), memmap=False) as hdul: | |
# memmap = False to avoid leaving open a mmap to the file when we | |
# access the data--this causes problems on Windows when we try to | |
# overwrite the file later | |
assert 'TESTKW' in hdul[0].header | |
assert hdul[0].header == hdu.header | |
assert (hdul[0].data == data).all() | |
# Add blanks until the header is extended to two block sizes | |
while len(hdu.header) < 36: | |
hdu.header.append() | |
with ignore_warnings(): | |
hdu.writeto(self.temp('test.fits'), overwrite=True) | |
with fits.open(self.temp('test.fits')) as hdul: | |
assert 'TESTKW' in hdul[0].header | |
assert hdul[0].header == hdu.header | |
> assert (hdul[0].data == data).all() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_header.py:1936: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________________ TestImageFunctions.test_io_manipulation _________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x000000012326da28> | |
@pytest.mark.xfail(platform.system() == 'Windows' and not NUMPY_LT_1_12, | |
reason='https://github.com/astropy/astropy/issues/5797') | |
def test_io_manipulation(self): | |
# Get a keyword value. An extension can be referred by name or by | |
# number. Both extension and keyword names are case insensitive. | |
with fits.open(self.data('test0.fits')) as r: | |
assert r['primary'].header['naxis'] == 0 | |
assert r[0].header['naxis'] == 0 | |
# If there are more than one extension with the same EXTNAME value, | |
# the EXTVER can be used (as the second argument) to distinguish | |
# the extension. | |
assert r['sci', 1].header['detector'] == 1 | |
# append (using "update()") a new card | |
r[0].header['xxx'] = 1.234e56 | |
assert ('\n'.join(str(x) for x in r[0].header.cards[-3:]) == | |
"EXPFLAG = 'NORMAL ' / Exposure interruption indicator \n" | |
"FILENAME= 'vtest3.fits' / File name \n" | |
"XXX = 1.234E+56 ") | |
# rename a keyword | |
r[0].header.rename_keyword('filename', 'fname') | |
pytest.raises(ValueError, r[0].header.rename_keyword, 'fname', | |
'history') | |
pytest.raises(ValueError, r[0].header.rename_keyword, 'fname', | |
'simple') | |
r[0].header.rename_keyword('fname', 'filename') | |
# get a subsection of data | |
assert np.array_equal(r[2].data[:3, :3], | |
np.array([[349, 349, 348], | |
[349, 349, 347], | |
[347, 350, 349]], dtype=np.int16)) | |
# We can create a new FITS file by opening a new file with "append" | |
# mode. | |
with fits.open(self.temp('test_new.fits'), mode='append') as n: | |
# Append the primary header and the 2nd extension to the new | |
# file. | |
n.append(r[0]) | |
n.append(r[2]) | |
# The flush method will write the current HDUList object back | |
# to the newly created file on disk. The HDUList is still open | |
# and can be further operated. | |
n.flush() | |
assert n[1].data[1, 1] == 349 | |
# modify a data point | |
> n[1].data[1, 1] = 99 | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:252: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x00000001160cc3d8>, <astropy.io.fits.hdu.image.ImageHDU object at 0x00000001163a4c28>], type = None, value = None, traceback = None | |
def __exit__(self, type, value, traceback): | |
> self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x00000001160cc3d8>, <astropy.io.fits.hdu.image.ImageHDU object at 0x00000001163a4c28>], output_verify = 'exception', verbose = False | |
closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
self.flush(output_verify=output_verify, verbose=verbose) | |
finally: | |
if self._file and closed and hasattr(self._file, 'close'): | |
self._file.close() | |
# Give individual HDUs an opportunity to do on-close cleanup | |
for hdu in self: | |
> hdu._close(closed=closed) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:898: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.hdu.image.ImageHDU object at 0x00000001163a4c28>, closed = True | |
def _close(self, closed=True): | |
# If the data was mmap'd, close the underlying mmap (this will | |
# prevent any future access to the .data attribute if there are | |
# not other references to it; if there are other references then | |
# it is up to the user to clean those up | |
if (closed and self._data_loaded and | |
_get_array_mmap(self.data) is not None): | |
> del self.data | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/base.py:716: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.utils.decorators.lazyproperty object at 0x000000011459eea0>, obj = <astropy.io.fits.hdu.image.ImageHDU object at 0x00000001163a4c28> | |
def __delete__(self, obj): | |
if self.fdel: | |
> self.fdel(obj) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:732: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.hdu.image.ImageHDU object at 0x00000001163a4c28> | |
def data(self): | |
# The deleter | |
if self._file is not None and self._data_loaded: | |
> data_refcount = sys.getrefcount(self.data) | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/base.py:106: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x000000012326da28> | |
@pytest.mark.xfail(platform.system() == 'Windows' and not NUMPY_LT_1_12, | |
reason='https://github.com/astropy/astropy/issues/5797') | |
def test_io_manipulation(self): | |
# Get a keyword value. An extension can be referred by name or by | |
# number. Both extension and keyword names are case insensitive. | |
with fits.open(self.data('test0.fits')) as r: | |
assert r['primary'].header['naxis'] == 0 | |
assert r[0].header['naxis'] == 0 | |
# If there are more than one extension with the same EXTNAME value, | |
# the EXTVER can be used (as the second argument) to distinguish | |
# the extension. | |
assert r['sci', 1].header['detector'] == 1 | |
# append (using "update()") a new card | |
r[0].header['xxx'] = 1.234e56 | |
assert ('\n'.join(str(x) for x in r[0].header.cards[-3:]) == | |
"EXPFLAG = 'NORMAL ' / Exposure interruption indicator \n" | |
"FILENAME= 'vtest3.fits' / File name \n" | |
"XXX = 1.234E+56 ") | |
# rename a keyword | |
r[0].header.rename_keyword('filename', 'fname') | |
pytest.raises(ValueError, r[0].header.rename_keyword, 'fname', | |
'history') | |
pytest.raises(ValueError, r[0].header.rename_keyword, 'fname', | |
'simple') | |
r[0].header.rename_keyword('fname', 'filename') | |
# get a subsection of data | |
assert np.array_equal(r[2].data[:3, :3], | |
np.array([[349, 349, 348], | |
[349, 349, 347], | |
[347, 350, 349]], dtype=np.int16)) | |
# We can create a new FITS file by opening a new file with "append" | |
# mode. | |
with fits.open(self.temp('test_new.fits'), mode='append') as n: | |
# Append the primary header and the 2nd extension to the new | |
# file. | |
n.append(r[0]) | |
n.append(r[2]) | |
# The flush method will write the current HDUList object back | |
# to the newly created file on disk. The HDUList is still open | |
# and can be further operated. | |
n.flush() | |
assert n[1].data[1, 1] == 349 | |
# modify a data point | |
n[1].data[1, 1] = 99 | |
# When the file is closed, the most recent additions of | |
# extension(s) since last flush() will be appended, but any HDU | |
# already existed at the last flush will not be modified | |
del n | |
# If an existing file is opened with "append" mode, like the | |
# readonly mode, the HDU's will be read into the HDUList which can | |
# be modified in memory but can not be written back to the original | |
# file. A file opened with append mode can only add new HDU's. | |
os.rename(self.temp('test_new.fits'), | |
self.temp('test_append.fits')) | |
with fits.open(self.temp('test_append.fits'), mode='append') as a: | |
# The above change did not take effect since this was made | |
# after the flush(). | |
assert a[1].data[1, 1] == 349 | |
a.append(r[1]) | |
del a | |
# When changes are made to an HDUList which was opened with | |
# "update" mode, they will be written back to the original file | |
# when a flush/close is called. | |
os.rename(self.temp('test_append.fits'), | |
self.temp('test_update.fits')) | |
with fits.open(self.temp('test_update.fits'), mode='update') as u: | |
# When the changes do not alter the size structures of the | |
# original (or since last flush) HDUList, the changes are | |
# written back "in place". | |
assert u[0].header['rootname'] == 'U2EQ0201T' | |
u[0].header['rootname'] = 'abc' | |
assert u[1].data[1, 1] == 349 | |
u[1].data[1, 1] = 99 | |
u.flush() | |
# If the changes affect the size structure, e.g. adding or | |
# deleting HDU(s), header was expanded or reduced beyond | |
# existing number of blocks (2880 bytes in each block), or | |
# change the data size, the HDUList is written to a temporary | |
# file, the original file is deleted, and the temporary file is | |
# renamed to the original file name and reopened in the update | |
# mode. To a user, these two kinds of updating writeback seem | |
# to be the same, unless the optional argument in flush or | |
# close is set to 1. | |
del u[2] | |
u.flush() | |
# the write method in HDUList class writes the current HDUList, | |
# with all changes made up to now, to a new file. This method | |
# works the same disregard the mode the HDUList was opened | |
# with. | |
u.append(r[3]) | |
u.writeto(self.temp('test_new.fits')) | |
> del u | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:309: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________ TestImageFunctions.test_uint_header_consistency _____________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x000000011a0711d8> | |
def test_uint_header_consistency(self): | |
""" | |
Regression test for https://github.com/astropy/astropy/issues/2305 | |
This ensures that an HDU containing unsigned integer data always has | |
the apppriate BZERO value in its header. | |
""" | |
for int_size in (16, 32, 64): | |
# Just make an array of some unsigned ints that wouldn't fit in a | |
# signed int array of the same bit width | |
max_uint = (2 ** int_size) - 1 | |
if int_size == 64: | |
max_uint = np.uint64(int_size) | |
dtype = 'uint{}'.format(int_size) | |
arr = np.empty(100, dtype=dtype) | |
arr.fill(max_uint) | |
arr -= np.arange(100, dtype=dtype) | |
uint_hdu = fits.PrimaryHDU(data=arr) | |
assert np.all(uint_hdu.data == arr) | |
assert uint_hdu.data.dtype.name == 'uint{}'.format(int_size) | |
assert 'BZERO' in uint_hdu.header | |
assert uint_hdu.header['BZERO'] == (2 ** (int_size - 1)) | |
filename = 'uint{}.fits'.format(int_size) | |
uint_hdu.writeto(self.temp(filename)) | |
with fits.open(self.temp(filename), uint=True) as hdul: | |
new_uint_hdu = hdul[0] | |
assert np.all(new_uint_hdu.data == arr) | |
assert new_uint_hdu.data.dtype.name == 'uint{}'.format(int_size) | |
assert 'BZERO' in new_uint_hdu.header | |
> assert new_uint_hdu.header['BZERO'] == (2 ** (int_size - 1)) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:716: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
__________________________________________________________ TestImageFunctions.test_uint_header_keywords_removed_after_bitpix_change[False-False] __________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x00000001195d5088>, from_file = False, do_not_scale = False | |
@pytest.mark.parametrize(('from_file'), (False, True)) | |
@pytest.mark.parametrize(('do_not_scale'), (False,)) | |
def test_uint_header_keywords_removed_after_bitpix_change(self, | |
from_file, | |
do_not_scale): | |
""" | |
Regression test for https://github.com/astropy/astropy/issues/4974 | |
BZERO/BSCALE should be removed if data is converted to a floating | |
point type. | |
Currently excluding the case where do_not_scale_image_data=True | |
because it is not clear what the expectation should be. | |
""" | |
arr = np.zeros(100, dtype='uint16') | |
if from_file: | |
# To generate the proper input file we always want to scale the | |
# data before writing it...otherwise when we open it will be | |
# regular (signed) int data. | |
tmp_uint = fits.PrimaryHDU(arr) | |
filename = 'unsigned_int.fits' | |
tmp_uint.writeto(self.temp(filename)) | |
with fits.open(self.temp(filename), | |
do_not_scale_image_data=do_not_scale) as f: | |
uint_hdu = f[0] | |
# Force a read before we close. | |
_ = uint_hdu.data | |
else: | |
uint_hdu = fits.PrimaryHDU(arr, | |
do_not_scale_image_data=do_not_scale) | |
# Make sure appropriate keywords are in the header. See | |
# https://github.com/astropy/astropy/pull/3916#issuecomment-122414532 | |
# for discussion. | |
assert 'BSCALE' in uint_hdu.header | |
assert 'BZERO' in uint_hdu.header | |
assert uint_hdu.header['BSCALE'] == 1 | |
assert uint_hdu.header['BZERO'] == 32768 | |
# Convert data to floating point... | |
uint_hdu.data = uint_hdu.data * 1.0 | |
# ...bitpix should be negative. | |
assert uint_hdu.header['BITPIX'] < 0 | |
# BSCALE and BZERO should NOT be in header any more. | |
assert 'BSCALE' not in uint_hdu.header | |
assert 'BZERO' not in uint_hdu.header | |
# This is the main test...the data values should round trip | |
# as zero. | |
filename = 'test_uint_to_float.fits' | |
uint_hdu.writeto(self.temp(filename)) | |
with fits.open(self.temp(filename)) as hdul: | |
> assert (hdul[0].data == 0).all() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:774: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
__________________________________________________________ TestImageFunctions.test_uint_header_keywords_removed_after_bitpix_change[False-True] ___________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x0000000120bae250>, from_file = True, do_not_scale = False | |
@pytest.mark.parametrize(('from_file'), (False, True)) | |
@pytest.mark.parametrize(('do_not_scale'), (False,)) | |
def test_uint_header_keywords_removed_after_bitpix_change(self, | |
from_file, | |
do_not_scale): | |
""" | |
Regression test for https://github.com/astropy/astropy/issues/4974 | |
BZERO/BSCALE should be removed if data is converted to a floating | |
point type. | |
Currently excluding the case where do_not_scale_image_data=True | |
because it is not clear what the expectation should be. | |
""" | |
arr = np.zeros(100, dtype='uint16') | |
if from_file: | |
# To generate the proper input file we always want to scale the | |
# data before writing it...otherwise when we open it will be | |
# regular (signed) int data. | |
tmp_uint = fits.PrimaryHDU(arr) | |
filename = 'unsigned_int.fits' | |
tmp_uint.writeto(self.temp(filename)) | |
with fits.open(self.temp(filename), | |
do_not_scale_image_data=do_not_scale) as f: | |
uint_hdu = f[0] | |
# Force a read before we close. | |
> _ = uint_hdu.data | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:746: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________________ TestImageFunctions.test_invalid_blanks __________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x0000000129a82bb8> | |
def test_invalid_blanks(self): | |
""" | |
Test that invalid use of the BLANK keyword leads to an appropriate | |
warning, and that the BLANK keyword is ignored when returning the | |
HDU data. | |
Regression test for https://github.com/astropy/astropy/issues/3865 | |
""" | |
arr = np.arange(5, dtype=np.float64) | |
hdu = fits.PrimaryHDU(data=arr) | |
hdu.header['BLANK'] = 2 | |
with catch_warnings() as w: | |
hdu.writeto(self.temp('test_new.fits')) | |
# Allow the HDU to be written, but there should be a warning | |
# when writing a header with BLANK when then data is not | |
# int | |
assert len(w) == 1 | |
assert "Invalid 'BLANK' keyword in header" in str(w[0].message) | |
# Should also get a warning when opening the file, and the BLANK | |
# value should not be applied | |
with catch_warnings() as w: | |
with fits.open(self.temp('test_new.fits')) as h: | |
assert len(w) == 1 | |
assert "Invalid 'BLANK' keyword in header" in str(w[0].message) | |
> assert np.all(arr == h[0].data) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:818: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________ TestImageFunctions.test_scale_back_with_blanks ______________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x00000001232cf280> | |
def test_scale_back_with_blanks(self): | |
""" | |
Test that when auto-rescaling integer data with "blank" values (where | |
the blanks are replaced by NaN in the float data), that the "BLANK" | |
keyword is removed from the header. | |
Further, test that when using the ``scale_back=True`` option the blank | |
values are restored properly. | |
Regression test for https://github.com/astropy/astropy/issues/3865 | |
""" | |
# Make the sample file | |
arr = np.arange(5, dtype=np.int32) | |
hdu = fits.PrimaryHDU(data=arr) | |
hdu.scale('int16', bscale=1.23) | |
# Creating data that uses BLANK is currently kludgy--a separate issue | |
# TODO: Rewrite this test when scaling with blank support is better | |
# supported | |
# Let's just add a value to the data that should be converted to NaN | |
# when it is read back in: | |
hdu.data[0] = 9999 | |
hdu.header['BLANK'] = 9999 | |
hdu.writeto(self.temp('test.fits')) | |
with fits.open(self.temp('test.fits')) as hdul: | |
data = hdul[0].data | |
assert np.isnan(data[0]) | |
> hdul.writeto(self.temp('test2.fits')) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:850: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
__________________________________________________________________________ TestImageFunctions.test_rewriting_large_scaled_image ___________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x0000000137e98c98> | |
def test_rewriting_large_scaled_image(self): | |
"""Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/84 and | |
https://aeon.stsci.edu/ssb/trac/pyfits/ticket/101 | |
""" | |
hdul = fits.open(self.data('fixed-1890.fits')) | |
orig_data = hdul[0].data | |
with ignore_warnings(): | |
hdul.writeto(self.temp('test_new.fits'), overwrite=True) | |
> hdul.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:896: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_______________________________________________________________________________ TestImageFunctions.test_image_update_header _______________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x00000001229bf4b0> | |
def test_image_update_header(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/105 | |
Replacing the original header to an image HDU and saving should update | |
the NAXISn keywords appropriately and save the image data correctly. | |
""" | |
# Copy the original file before saving to it | |
self.copy_file('test0.fits') | |
with fits.open(self.temp('test0.fits'), mode='update') as hdul: | |
orig_data = hdul[1].data.copy() | |
hdr_copy = hdul[1].header.copy() | |
del hdr_copy['NAXIS*'] | |
> hdul[1].header = hdr_copy | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:942: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________ TestImageFunctions.test_open_scaled_in_update_mode ____________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x00000001264adcc8> | |
def test_open_scaled_in_update_mode(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/119 | |
(Don't update scaled image data if the data is not read) | |
This ensures that merely opening and closing a file containing scaled | |
image data does not cause any change to the data (or the header). | |
Changes should only occur if the data is accessed. | |
""" | |
# Copy the original file before making any possible changes to it | |
self.copy_file('scale.fits') | |
mtime = os.stat(self.temp('scale.fits')).st_mtime | |
time.sleep(1) | |
fits.open(self.temp('scale.fits'), mode='update').close() | |
# Ensure that no changes were made to the file merely by immediately | |
# opening and closing it. | |
assert mtime == os.stat(self.temp('scale.fits')).st_mtime | |
# Insert a slight delay to ensure the mtime does change when the file | |
# is changed | |
time.sleep(1) | |
hdul = fits.open(self.temp('scale.fits'), 'update') | |
orig_data = hdul[0].data | |
> hdul.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:975: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________________ TestImageFunctions.test_scale_back ____________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x00000001273e6918> | |
def test_scale_back(self): | |
"""A simple test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/120 | |
The scale_back feature for image HDUs. | |
""" | |
self.copy_file('scale.fits') | |
with fits.open(self.temp('scale.fits'), mode='update', | |
scale_back=True) as hdul: | |
orig_bitpix = hdul[0].header['BITPIX'] | |
orig_bzero = hdul[0].header['BZERO'] | |
orig_bscale = hdul[0].header['BSCALE'] | |
orig_data = hdul[0].data.copy() | |
> hdul[0].data[0] = 0 | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1011: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________________ TestImageFunctions.test_image_none ____________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x0000000121b29130> | |
def test_image_none(self): | |
""" | |
Regression test for https://github.com/spacetelescope/PyFITS/issues/27 | |
""" | |
with fits.open(self.data('test0.fits')) as h: | |
h[1].data | |
h[1].data = None | |
> h[1].writeto(self.temp('test.fits')) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1033: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
__________________________________________________________________________________ TestImageFunctions.test_invalid_blank __________________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x0000000119fef830> | |
def test_invalid_blank(self): | |
""" | |
Regression test for https://github.com/astropy/astropy/issues/2711 | |
If the BLANK keyword contains an invalid value it should be ignored for | |
any calculations (though a warning should be issued). | |
""" | |
data = np.arange(100, dtype=np.float64) | |
hdu = fits.PrimaryHDU(data) | |
hdu.header['BLANK'] = 'nan' | |
hdu.writeto(self.temp('test.fits')) | |
with catch_warnings() as w: | |
with fits.open(self.temp('test.fits')) as hdul: | |
> assert np.all(hdul[0].data == data) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1056: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
___________________________________________________________________________ TestImageFunctions.test_scale_back_uint_assignment ____________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestImageFunctions object at 0x0000000112ab1130> | |
def test_scale_back_uint_assignment(self): | |
""" | |
Extend fix for #4600 to assignment to data | |
Suggested by: | |
https://github.com/astropy/astropy/pull/4602#issuecomment-208713748 | |
""" | |
a = np.arange(100, 200, dtype=np.uint16) | |
fits.PrimaryHDU(a).writeto(self.temp('test.fits')) | |
with fits.open(self.temp('test.fits'), mode="update", | |
scale_back=True) as (hdu,): | |
hdu.data[:] = 0 | |
> assert np.allclose(hdu.data, 0) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1119: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_____________________________________________________________________________________ TestCompressedImage.test_empty ______________________________________________________________________________________ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000137bab088>, <astropy.io.fits.hdu.compressed.CompImageHDU object at 0x0000000137baafa8>], output_verify = 'exception', verbose = False | |
closed = True | |
def close(self, output_verify='exception', verbose=False, closed=True): | |
""" | |
Close the associated FITS file and memmap object, if any. | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print out verbose messages. | |
closed : bool | |
When `True`, close the underlying file object. | |
""" | |
try: | |
if (self._file and self._file.mode in ('append', 'update') | |
and not self._file.closed): | |
> self.flush(output_verify=output_verify, verbose=verbose) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:891: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000137bab088>, <astropy.io.fits.hdu.compressed.CompImageHDU object at 0x0000000137baafa8>], output_verify = 'exception', verbose = False | |
> func = make_function_with_signature(func, name=name, **wrapped_args) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/utils/decorators.py:827: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ([<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000137bab088>, <astropy.io.fits.hdu.compressed.CompImageHDU object at 0x0000000137baafa8>],) | |
kwargs = {'output_verify': 'exception', 'verbose': False}, curr_thread = <_MainThread(MainThread, started 140736100262784)>, single_thread = True | |
SigintHandler = <class 'astropy.io.fits.util.ignore_sigint.<locals>.wrapped.<locals>.SigintHandler'> | |
sigint_handler = <astropy.io.fits.util.ignore_sigint.<locals>.wrapped.<locals>.SigintHandler object at 0x0000000137babcc8>, old_handler = <built-in function default_int_handler> | |
@wraps(func) | |
def wrapped(*args, **kwargs): | |
# Get the name of the current thread and determine if this is a single | |
# threaded application | |
curr_thread = threading.currentThread() | |
single_thread = (threading.activeCount() == 1 and | |
curr_thread.getName() == 'MainThread') | |
class SigintHandler: | |
def __init__(self): | |
self.sigint_received = False | |
def __call__(self, signum, frame): | |
warnings.warn('KeyboardInterrupt ignored until {} is ' | |
'complete!'.format(func.__name__), | |
AstropyUserWarning) | |
self.sigint_received = True | |
sigint_handler = SigintHandler() | |
# Define new signal interput handler | |
if single_thread: | |
# Install new handler | |
old_handler = signal.signal(signal.SIGINT, sigint_handler) | |
try: | |
> func(*args, **kwargs) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/util.py:233: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000137bab088>, <astropy.io.fits.hdu.compressed.CompImageHDU object at 0x0000000137baafa8>], output_verify = 'exception', verbose = False | |
@ignore_sigint | |
def flush(self, output_verify='fix', verbose=False): | |
""" | |
Force a write of the `HDUList` back to the file (for append and | |
update modes only). | |
Parameters | |
---------- | |
output_verify : str | |
Output verification option. Must be one of ``"fix"``, | |
``"silentfix"``, ``"ignore"``, ``"warn"``, or | |
``"exception"``. May also be any combination of ``"fix"`` or | |
``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" | |
(e.g. ``"fix+warn"``). See :ref:`verify` for more info. | |
verbose : bool | |
When `True`, print verbose messages | |
""" | |
if self._file.mode not in ('append', 'update', 'ostream'): | |
warnings.warn("Flush for '{}' mode is not supported." | |
.format(self._file.mode), AstropyUserWarning) | |
return | |
if self._save_backup and self._file.mode in ('append', 'update'): | |
filename = self._file.name | |
if os.path.exists(filename): | |
# The the file doesn't actually exist anymore for some reason | |
# then there's no point in trying to make a backup | |
backup = filename + '.bak' | |
idx = 1 | |
while os.path.exists(backup): | |
backup = filename + '.bak.' + str(idx) | |
idx += 1 | |
warnings.warn('Saving a backup of {} to {}.'.format( | |
filename, backup), AstropyUserWarning) | |
try: | |
shutil.copy(filename, backup) | |
except OSError as exc: | |
raise OSError('Failed to save backup to destination {}: ' | |
'{}'.format(filename, exc)) | |
self.verify(option=output_verify) | |
if self._file.mode in ('append', 'ostream'): | |
for hdu in self: | |
if verbose: | |
try: | |
extver = str(hdu._header['extver']) | |
except KeyError: | |
extver = '' | |
# only append HDU's which are "new" | |
if hdu._new: | |
hdu._prewriteto(checksum=hdu._output_checksum) | |
with _free_space_check(self): | |
hdu._writeto(self._file) | |
if verbose: | |
print('append HDU', hdu.name, extver) | |
hdu._new = False | |
hdu._postwriteto() | |
elif self._file.mode == 'update': | |
> self._flush_update() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:770: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000137bab088>, <astropy.io.fits.hdu.compressed.CompImageHDU object at 0x0000000137baafa8>] | |
def _flush_update(self): | |
"""Implements flushing changes to a file in update mode.""" | |
for hdu in self: | |
# Need to all _prewriteto() for each HDU first to determine if | |
# resizing will be necessary | |
hdu._prewriteto(checksum=hdu._output_checksum, inplace=True) | |
try: | |
self._wasresized() | |
# if the HDUList is resized, need to write out the entire contents of | |
# the hdulist to the file. | |
if self._resize or self._file.compression: | |
> self._flush_resize() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1186: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [<astropy.io.fits.hdu.image.PrimaryHDU object at 0x0000000137bab088>, <astropy.io.fits.hdu.compressed.CompImageHDU object at 0x0000000137baafa8>] | |
def _flush_resize(self): | |
""" | |
Implements flushing changes in update mode when parts of one or more HDU | |
need to be resized. | |
""" | |
old_name = self._file.name | |
old_memmap = self._file.memmap | |
name = _tmp_name(old_name) | |
if not self._file.file_like: | |
old_mode = os.stat(old_name).st_mode | |
# The underlying file is an actual file object. The HDUList is | |
# resized, so we need to write it to a tmp file, delete the | |
# original file, and rename the tmp file to the original file. | |
if self._file.compression == 'gzip': | |
new_file = gzip.GzipFile(name, mode='ab+') | |
elif self._file.compression == 'bzip2': | |
new_file = bz2.BZ2File(name, mode='w') | |
else: | |
new_file = name | |
with self.fromfile(new_file, mode='append') as hdulist: | |
for hdu in self: | |
hdu._writeto(hdulist._file, inplace=True, copy=True) | |
if sys.platform.startswith('win'): | |
# Collect a list of open mmaps to the data; this well be | |
# used later. See below. | |
mmaps = [(idx, _get_array_mmap(hdu.data), hdu.data) | |
for idx, hdu in enumerate(self) if hdu._has_data] | |
hdulist._file.close() | |
> self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:1232: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>> | |
def close(self): | |
""" | |
Close the 'physical' FITS file. | |
""" | |
if hasattr(self._file, 'close'): | |
self._file.close() | |
> self._maybe_close_mmap() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
During handling of the above exception, another exception occurred: | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x00000001199038a0> | |
def test_empty(self): | |
""" | |
Regression test for https://github.com/astropy/astropy/issues/2595 | |
""" | |
hdu = fits.CompImageHDU() | |
assert hdu.data is None | |
hdu.writeto(self.temp('test.fits')) | |
with fits.open(self.temp('test.fits'), mode='update') as hdul: | |
assert len(hdul) == 2 | |
assert isinstance(hdul[1], fits.CompImageHDU) | |
assert hdul[1].data is None | |
# Now test replacing the empty data with an array and see what | |
# happens | |
> hdul[1].data = np.arange(100, dtype=np.int32) | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1139: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________ TestCompressedImage.test_comp_image[<-data0-RICE_1-16] __________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x0000000114b0c598> | |
data = array([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0...], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]], dtype=float32) | |
compression_type = 'RICE_1', quantize_level = 16, byte_order = '<' | |
@pytest.mark.parametrize( | |
('data', 'compression_type', 'quantize_level'), | |
[(np.zeros((2, 10, 10), dtype=np.float32), 'RICE_1', 16), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_1', -0.01), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_2', -0.01), | |
(np.zeros((100, 100)) + 1, 'HCOMPRESS_1', 16), | |
(np.zeros((10, 10)), 'PLIO_1', 16)]) | |
@pytest.mark.parametrize('byte_order', ['<', '>']) | |
def test_comp_image(self, data, compression_type, quantize_level, | |
byte_order): | |
data = data.newbyteorder(byte_order) | |
primary_hdu = fits.PrimaryHDU() | |
ofd = fits.HDUList(primary_hdu) | |
chdu = fits.CompImageHDU(data, name='SCI', | |
compression_type=compression_type, | |
quantize_level=quantize_level) | |
ofd.append(chdu) | |
ofd.writeto(self.temp('test_new.fits'), overwrite=True) | |
ofd.close() | |
with fits.open(self.temp('test_new.fits')) as fd: | |
assert (fd[1].data == data).all() | |
assert fd[1].header['NAXIS'] == chdu.header['NAXIS'] | |
assert fd[1].header['NAXIS1'] == chdu.header['NAXIS1'] | |
assert fd[1].header['NAXIS2'] == chdu.header['NAXIS2'] | |
> assert fd[1].header['BITPIX'] == chdu.header['BITPIX'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1170: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
________________________________________________________________________ TestCompressedImage.test_comp_image[<-data1-GZIP_1--0.01] ________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x000000013991f5c8> | |
data = array([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0...], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]], dtype=float32) | |
compression_type = 'GZIP_1', quantize_level = -0.01, byte_order = '<' | |
@pytest.mark.parametrize( | |
('data', 'compression_type', 'quantize_level'), | |
[(np.zeros((2, 10, 10), dtype=np.float32), 'RICE_1', 16), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_1', -0.01), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_2', -0.01), | |
(np.zeros((100, 100)) + 1, 'HCOMPRESS_1', 16), | |
(np.zeros((10, 10)), 'PLIO_1', 16)]) | |
@pytest.mark.parametrize('byte_order', ['<', '>']) | |
def test_comp_image(self, data, compression_type, quantize_level, | |
byte_order): | |
data = data.newbyteorder(byte_order) | |
primary_hdu = fits.PrimaryHDU() | |
ofd = fits.HDUList(primary_hdu) | |
chdu = fits.CompImageHDU(data, name='SCI', | |
compression_type=compression_type, | |
quantize_level=quantize_level) | |
ofd.append(chdu) | |
ofd.writeto(self.temp('test_new.fits'), overwrite=True) | |
ofd.close() | |
with fits.open(self.temp('test_new.fits')) as fd: | |
assert (fd[1].data == data).all() | |
assert fd[1].header['NAXIS'] == chdu.header['NAXIS'] | |
assert fd[1].header['NAXIS1'] == chdu.header['NAXIS1'] | |
assert fd[1].header['NAXIS2'] == chdu.header['NAXIS2'] | |
> assert fd[1].header['BITPIX'] == chdu.header['BITPIX'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1170: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
________________________________________________________________________ TestCompressedImage.test_comp_image[<-data2-GZIP_2--0.01] ________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x000000011d2d5a28> | |
data = array([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0...], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]], dtype=float32) | |
compression_type = 'GZIP_2', quantize_level = -0.01, byte_order = '<' | |
@pytest.mark.parametrize( | |
('data', 'compression_type', 'quantize_level'), | |
[(np.zeros((2, 10, 10), dtype=np.float32), 'RICE_1', 16), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_1', -0.01), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_2', -0.01), | |
(np.zeros((100, 100)) + 1, 'HCOMPRESS_1', 16), | |
(np.zeros((10, 10)), 'PLIO_1', 16)]) | |
@pytest.mark.parametrize('byte_order', ['<', '>']) | |
def test_comp_image(self, data, compression_type, quantize_level, | |
byte_order): | |
data = data.newbyteorder(byte_order) | |
primary_hdu = fits.PrimaryHDU() | |
ofd = fits.HDUList(primary_hdu) | |
chdu = fits.CompImageHDU(data, name='SCI', | |
compression_type=compression_type, | |
quantize_level=quantize_level) | |
ofd.append(chdu) | |
ofd.writeto(self.temp('test_new.fits'), overwrite=True) | |
ofd.close() | |
with fits.open(self.temp('test_new.fits')) as fd: | |
assert (fd[1].data == data).all() | |
assert fd[1].header['NAXIS'] == chdu.header['NAXIS'] | |
assert fd[1].header['NAXIS1'] == chdu.header['NAXIS1'] | |
assert fd[1].header['NAXIS2'] == chdu.header['NAXIS2'] | |
> assert fd[1].header['BITPIX'] == chdu.header['BITPIX'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1170: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_______________________________________________________________________ TestCompressedImage.test_comp_image[<-data3-HCOMPRESS_1-16] _______________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x00000001371d04f0> | |
data = array([[1., 1., 1., ..., 1., 1., 1.], | |
[1., 1., 1., ..., 1., 1., 1.], | |
[1., 1., 1., ..., 1., 1., 1.], | |
..., | |
[1., 1., 1., ..., 1., 1., 1.], | |
[1., 1., 1., ..., 1., 1., 1.], | |
[1., 1., 1., ..., 1., 1., 1.]]) | |
compression_type = 'HCOMPRESS_1', quantize_level = 16, byte_order = '<' | |
@pytest.mark.parametrize( | |
('data', 'compression_type', 'quantize_level'), | |
[(np.zeros((2, 10, 10), dtype=np.float32), 'RICE_1', 16), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_1', -0.01), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_2', -0.01), | |
(np.zeros((100, 100)) + 1, 'HCOMPRESS_1', 16), | |
(np.zeros((10, 10)), 'PLIO_1', 16)]) | |
@pytest.mark.parametrize('byte_order', ['<', '>']) | |
def test_comp_image(self, data, compression_type, quantize_level, | |
byte_order): | |
data = data.newbyteorder(byte_order) | |
primary_hdu = fits.PrimaryHDU() | |
ofd = fits.HDUList(primary_hdu) | |
chdu = fits.CompImageHDU(data, name='SCI', | |
compression_type=compression_type, | |
quantize_level=quantize_level) | |
ofd.append(chdu) | |
ofd.writeto(self.temp('test_new.fits'), overwrite=True) | |
ofd.close() | |
with fits.open(self.temp('test_new.fits')) as fd: | |
assert (fd[1].data == data).all() | |
assert fd[1].header['NAXIS'] == chdu.header['NAXIS'] | |
assert fd[1].header['NAXIS1'] == chdu.header['NAXIS1'] | |
assert fd[1].header['NAXIS2'] == chdu.header['NAXIS2'] | |
> assert fd[1].header['BITPIX'] == chdu.header['BITPIX'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1170: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________ TestCompressedImage.test_comp_image[<-data4-PLIO_1-16] __________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x00000001382126b0> | |
data = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., ...0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) | |
compression_type = 'PLIO_1', quantize_level = 16, byte_order = '<' | |
@pytest.mark.parametrize( | |
('data', 'compression_type', 'quantize_level'), | |
[(np.zeros((2, 10, 10), dtype=np.float32), 'RICE_1', 16), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_1', -0.01), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_2', -0.01), | |
(np.zeros((100, 100)) + 1, 'HCOMPRESS_1', 16), | |
(np.zeros((10, 10)), 'PLIO_1', 16)]) | |
@pytest.mark.parametrize('byte_order', ['<', '>']) | |
def test_comp_image(self, data, compression_type, quantize_level, | |
byte_order): | |
data = data.newbyteorder(byte_order) | |
primary_hdu = fits.PrimaryHDU() | |
ofd = fits.HDUList(primary_hdu) | |
chdu = fits.CompImageHDU(data, name='SCI', | |
compression_type=compression_type, | |
quantize_level=quantize_level) | |
ofd.append(chdu) | |
ofd.writeto(self.temp('test_new.fits'), overwrite=True) | |
ofd.close() | |
with fits.open(self.temp('test_new.fits')) as fd: | |
assert (fd[1].data == data).all() | |
assert fd[1].header['NAXIS'] == chdu.header['NAXIS'] | |
assert fd[1].header['NAXIS1'] == chdu.header['NAXIS1'] | |
assert fd[1].header['NAXIS2'] == chdu.header['NAXIS2'] | |
> assert fd[1].header['BITPIX'] == chdu.header['BITPIX'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1170: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________ TestCompressedImage.test_comp_image[>-data0-RICE_1-16] __________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x0000000137e0ea30> | |
data = array([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0...], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]], dtype=float32) | |
compression_type = 'RICE_1', quantize_level = 16, byte_order = '>' | |
@pytest.mark.parametrize( | |
('data', 'compression_type', 'quantize_level'), | |
[(np.zeros((2, 10, 10), dtype=np.float32), 'RICE_1', 16), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_1', -0.01), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_2', -0.01), | |
(np.zeros((100, 100)) + 1, 'HCOMPRESS_1', 16), | |
(np.zeros((10, 10)), 'PLIO_1', 16)]) | |
@pytest.mark.parametrize('byte_order', ['<', '>']) | |
def test_comp_image(self, data, compression_type, quantize_level, | |
byte_order): | |
data = data.newbyteorder(byte_order) | |
primary_hdu = fits.PrimaryHDU() | |
ofd = fits.HDUList(primary_hdu) | |
chdu = fits.CompImageHDU(data, name='SCI', | |
compression_type=compression_type, | |
quantize_level=quantize_level) | |
ofd.append(chdu) | |
ofd.writeto(self.temp('test_new.fits'), overwrite=True) | |
ofd.close() | |
with fits.open(self.temp('test_new.fits')) as fd: | |
assert (fd[1].data == data).all() | |
assert fd[1].header['NAXIS'] == chdu.header['NAXIS'] | |
assert fd[1].header['NAXIS1'] == chdu.header['NAXIS1'] | |
assert fd[1].header['NAXIS2'] == chdu.header['NAXIS2'] | |
> assert fd[1].header['BITPIX'] == chdu.header['BITPIX'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1170: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
________________________________________________________________________ TestCompressedImage.test_comp_image[>-data1-GZIP_1--0.01] ________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x0000000119e3c4f0> | |
data = array([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0...], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]], dtype=float32) | |
compression_type = 'GZIP_1', quantize_level = -0.01, byte_order = '>' | |
@pytest.mark.parametrize( | |
('data', 'compression_type', 'quantize_level'), | |
[(np.zeros((2, 10, 10), dtype=np.float32), 'RICE_1', 16), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_1', -0.01), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_2', -0.01), | |
(np.zeros((100, 100)) + 1, 'HCOMPRESS_1', 16), | |
(np.zeros((10, 10)), 'PLIO_1', 16)]) | |
@pytest.mark.parametrize('byte_order', ['<', '>']) | |
def test_comp_image(self, data, compression_type, quantize_level, | |
byte_order): | |
data = data.newbyteorder(byte_order) | |
primary_hdu = fits.PrimaryHDU() | |
ofd = fits.HDUList(primary_hdu) | |
chdu = fits.CompImageHDU(data, name='SCI', | |
compression_type=compression_type, | |
quantize_level=quantize_level) | |
ofd.append(chdu) | |
ofd.writeto(self.temp('test_new.fits'), overwrite=True) | |
ofd.close() | |
with fits.open(self.temp('test_new.fits')) as fd: | |
assert (fd[1].data == data).all() | |
assert fd[1].header['NAXIS'] == chdu.header['NAXIS'] | |
assert fd[1].header['NAXIS1'] == chdu.header['NAXIS1'] | |
assert fd[1].header['NAXIS2'] == chdu.header['NAXIS2'] | |
> assert fd[1].header['BITPIX'] == chdu.header['BITPIX'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1170: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
________________________________________________________________________ TestCompressedImage.test_comp_image[>-data2-GZIP_2--0.01] ________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x000000012747fc58> | |
data = array([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0...], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]], dtype=float32) | |
compression_type = 'GZIP_2', quantize_level = -0.01, byte_order = '>' | |
@pytest.mark.parametrize( | |
('data', 'compression_type', 'quantize_level'), | |
[(np.zeros((2, 10, 10), dtype=np.float32), 'RICE_1', 16), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_1', -0.01), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_2', -0.01), | |
(np.zeros((100, 100)) + 1, 'HCOMPRESS_1', 16), | |
(np.zeros((10, 10)), 'PLIO_1', 16)]) | |
@pytest.mark.parametrize('byte_order', ['<', '>']) | |
def test_comp_image(self, data, compression_type, quantize_level, | |
byte_order): | |
data = data.newbyteorder(byte_order) | |
primary_hdu = fits.PrimaryHDU() | |
ofd = fits.HDUList(primary_hdu) | |
chdu = fits.CompImageHDU(data, name='SCI', | |
compression_type=compression_type, | |
quantize_level=quantize_level) | |
ofd.append(chdu) | |
ofd.writeto(self.temp('test_new.fits'), overwrite=True) | |
ofd.close() | |
with fits.open(self.temp('test_new.fits')) as fd: | |
assert (fd[1].data == data).all() | |
assert fd[1].header['NAXIS'] == chdu.header['NAXIS'] | |
assert fd[1].header['NAXIS1'] == chdu.header['NAXIS1'] | |
assert fd[1].header['NAXIS2'] == chdu.header['NAXIS2'] | |
> assert fd[1].header['BITPIX'] == chdu.header['BITPIX'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1170: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_______________________________________________________________________ TestCompressedImage.test_comp_image[>-data3-HCOMPRESS_1-16] _______________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x00000001384ebd00> | |
data = array([[3.03865e-319, 3.03865e-319, 3.03865e-319, ..., 3.03865e-319, | |
3.03865e-319, 3.03865e-319], | |
[3.03...03865e-319], | |
[3.03865e-319, 3.03865e-319, 3.03865e-319, ..., 3.03865e-319, | |
3.03865e-319, 3.03865e-319]]) | |
compression_type = 'HCOMPRESS_1', quantize_level = 16, byte_order = '>' | |
@pytest.mark.parametrize( | |
('data', 'compression_type', 'quantize_level'), | |
[(np.zeros((2, 10, 10), dtype=np.float32), 'RICE_1', 16), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_1', -0.01), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_2', -0.01), | |
(np.zeros((100, 100)) + 1, 'HCOMPRESS_1', 16), | |
(np.zeros((10, 10)), 'PLIO_1', 16)]) | |
@pytest.mark.parametrize('byte_order', ['<', '>']) | |
def test_comp_image(self, data, compression_type, quantize_level, | |
byte_order): | |
data = data.newbyteorder(byte_order) | |
primary_hdu = fits.PrimaryHDU() | |
ofd = fits.HDUList(primary_hdu) | |
chdu = fits.CompImageHDU(data, name='SCI', | |
compression_type=compression_type, | |
quantize_level=quantize_level) | |
ofd.append(chdu) | |
ofd.writeto(self.temp('test_new.fits'), overwrite=True) | |
ofd.close() | |
with fits.open(self.temp('test_new.fits')) as fd: | |
assert (fd[1].data == data).all() | |
assert fd[1].header['NAXIS'] == chdu.header['NAXIS'] | |
assert fd[1].header['NAXIS1'] == chdu.header['NAXIS1'] | |
assert fd[1].header['NAXIS2'] == chdu.header['NAXIS2'] | |
> assert fd[1].header['BITPIX'] == chdu.header['BITPIX'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1170: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
_________________________________________________________________________ TestCompressedImage.test_comp_image[>-data4-PLIO_1-16] __________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x0000000122c01248> | |
data = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., ...0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], | |
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) | |
compression_type = 'PLIO_1', quantize_level = 16, byte_order = '>' | |
@pytest.mark.parametrize( | |
('data', 'compression_type', 'quantize_level'), | |
[(np.zeros((2, 10, 10), dtype=np.float32), 'RICE_1', 16), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_1', -0.01), | |
(np.zeros((2, 10, 10), dtype=np.float32), 'GZIP_2', -0.01), | |
(np.zeros((100, 100)) + 1, 'HCOMPRESS_1', 16), | |
(np.zeros((10, 10)), 'PLIO_1', 16)]) | |
@pytest.mark.parametrize('byte_order', ['<', '>']) | |
def test_comp_image(self, data, compression_type, quantize_level, | |
byte_order): | |
data = data.newbyteorder(byte_order) | |
primary_hdu = fits.PrimaryHDU() | |
ofd = fits.HDUList(primary_hdu) | |
chdu = fits.CompImageHDU(data, name='SCI', | |
compression_type=compression_type, | |
quantize_level=quantize_level) | |
ofd.append(chdu) | |
ofd.writeto(self.temp('test_new.fits'), overwrite=True) | |
ofd.close() | |
with fits.open(self.temp('test_new.fits')) as fd: | |
assert (fd[1].data == data).all() | |
assert fd[1].header['NAXIS'] == chdu.header['NAXIS'] | |
assert fd[1].header['NAXIS1'] == chdu.header['NAXIS1'] | |
assert fd[1].header['NAXIS2'] == chdu.header['NAXIS2'] | |
> assert fd[1].header['BITPIX'] == chdu.header['BITPIX'] | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/tests/test_image.py:1170: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:371: in __exit__ | |
self.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/hdu/hdulist.py:894: in close | |
self._file.close() | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:374: in close | |
self._maybe_close_mmap() | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <astropy.io.fits.file._File <_io.FileIO [closed]>>, refcount_delta = 0 | |
def _maybe_close_mmap(self, refcount_delta=0): | |
""" | |
When mmap is in use these objects hold a reference to the mmap of the | |
file (so there is only one, shared by all HDUs that reference this | |
file). | |
This will close the mmap if there are no arrays referencing it. | |
""" | |
if (self._mmap is not None and | |
> sys.getrefcount(self._mmap) == 2 + refcount_delta): | |
E AttributeError: module 'sys' has no attribute 'getrefcount' | |
../../../software/anaconda3/envs/iminuit-270/site-packages/astropy/io/fits/file.py:392: AttributeError | |
________________________________________________________________________ TestCompressedImage.test_comp_image_hcompress_image_stack ________________________________________________________________________ | |
self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x000000012aac0aa0> | |
def test_comp_image_hcompress_image_stack(self): | |
""" | |
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/171 | |
Tests that data containing more than two dimensions can be | |
compressed with HCOMPRESS_1 so long as the user-supplied tile size can | |
be flattened to two dimensions. | |
""" | |
cube = np.arange(300, dtype=np.float32).reshape(3, 10, 10) | |
hdu = fits.CompImageHDU(data=cube, name='SCI', | |
compression_type='HCOMPRESS_1', | |
quantize_level=16, tile_size=[5, 5, 1]) | |
hdu.writeto(self.temp('test.fits')) | |
with fits.open(self.temp('test.fits')) as hdul: | |
# HCOMPRESSed images are allowed to deviate from |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment