Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: Failures due to astropy unit string reorder #2076

Closed
pllim opened this issue Mar 10, 2023 · 0 comments · Fixed by #2077
Closed

TST: Failures due to astropy unit string reorder #2076

pllim opened this issue Mar 10, 2023 · 0 comments · Fixed by #2077
Labels

Comments

@pllim
Copy link
Contributor

pllim commented Mar 10, 2023

Failures in dev job caused by:

=================================== FAILURES ===================================
_______________________ test_fits_image_hdu_with_microns _______________________

...
>       assert label_mouseover.as_text() == ('Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom cm2 s)',  # noqa
                                             'World 13h41m45.5759s +27d00m12.3044s (ICRS)',
                                             '205.4398995981 27.0034178810 (deg)')  # noqa
E       AssertionError: assert ('Pixel x=00....178810 (deg)') == ('Pixel x=00....178810 (deg)')
E         At index 0 diff: 'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom s cm2)' != 'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom cm2 s)'
E         Full diff:
E           (
E         -  'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom cm2 s)',
E         ?                                                                   --
E         +  'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom s cm2)',
E         ?                                                                ++
E            'World 13h41m45.5759s +27d00m12.3044s (ICRS)',
E            '205.4398995981 27.0034178810 (deg)',
E           )

jdaviz/configs/cubeviz/plugins/tests/test_parsers.py:48: AssertionError
_____________________ test_fits_image_hdu_parse_from_file ______________________

...
>       assert label_mouseover.as_text() == ('Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom cm2 s)',  # noqa
                                             'World 13h41m46.5994s +26d59m58.6136s (ICRS)',
                                             '205.4441642302 26.9996148973 (deg)')
E       AssertionError: assert ('Pixel x=00....148973 (deg)') == ('Pixel x=00....148973 (deg)')
E         At index 0 diff: 'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom s cm2)' != 'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom cm2 s)'
E         Full diff:
E           (
E         -  'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom cm2 s)',
E         ?                                                                   --
E         +  'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom s cm2)',
E         ?                                                                ++
E            'World 13h41m46.5994s +26d59m58.6136s (ICRS)',
E            '205.4441642302 26.9996148973 (deg)',
E           )

jdaviz/configs/cubeviz/plugins/tests/test_parsers.py:100: AssertionError
____________________________ test_spectrum3d_parse _____________________________

...
>       assert label_mouseover.as_text() == ('Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom cm2 s)',  # noqa
                                             'World 13h41m46.5994s +26d59m58.6136s (ICRS)',
                                             '205.4441642302 26.9996148973 (deg)')
E       AssertionError: assert ('Pixel x=00....148973 (deg)') == ('Pixel x=00....148973 (deg)')
E         At index 0 diff: 'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom s cm2)' != 'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom cm2 s)'
E         Full diff:
E           (
E         -  'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom cm2 s)',
E         ?                                                                   --
E         +  'Pixel x=00.0 y=00.0 Value +1.00000e+00 1e-17 erg / (Angstrom s cm2)',
E         ?                                                                ++
E            'World 13h41m46.5994s +26d59m58.6136s (ICRS)',
E            '205.4441642302 26.9996148973 (deg)',
E           )

jdaviz/configs/cubeviz/plugins/tests/test_parsers.py:129: AssertionError
______________ [doctest] jdaviz.models.physical_models.BlackBody _______________
057         and re-added internally when returning results.  Note that this can result in
058         ambiguous and unexpected results.  To avoid confusion, pass unitless
059         `scale` and `output_units` separately.
060 
061     Examples
062     --------
063     >>> from astropy.modeling import models
064     >>> from astropy import units as u
065     >>> bb = models.BlackBody(temperature=5000*u.K)
066     >>> bb(6000 * u.AA)  # doctest: +FLOAT_CMP
Expected:
    <Quantity 1.53254685e-05 erg / (cm2 Hz s sr)>
Got:
    <Quantity 1.53254685e-05 erg / (Hz s sr cm2)>

jdaviz/models/physical_models.py:66: DocTestFailure
...
============= 4 failed, 408 passed, 2 skipped in 265.68s (0:04:25) =============

🐱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant