Remote test for Ogle#1987
Conversation
bsipocz
left a comment
There was a problem hiding this comment.
I see some relevant test failures:
================================================= test session starts ==================================================
platform darwin -- Python 3.9.1, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
Downloading https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat
|==================================================================================| 1.3k/1.3k (100.00%) 0s
Running tests with astroquery version 0.4.2.dev6675_testrun.
Running tests in astroquery/ogle docs/ogle.
Date: 2021-04-19T18:06:58
Platform: macOS-10.13.6-x86_64-i386-64bit
Executable: /Users/bsipocz/.pyenv/versions/3.9.1/bin/python
Full Python Version:
3.9.1 (default, Jan 11 2021, 15:50:22)
[Clang 10.0.0 (clang-1000.11.45.5)]
encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15
Package versions:
Numpy: 1.19.5
Matplotlib: 3.3.3
Astropy: 4.2
APLpy: not available
pyregion: not available
pyVO: 1.1
astropy-helpers: 4.0.1
Using Astropy options: remote_data: any.
rootdir: /private/var/folders/dc/hsm7tqpx2d57n7vb3k1l81xw0000gq/T/astroquery-test-r772eiee/lib/python3.9/site-packages, configfile: setup.cfg
plugins: arraydiff-0.3, doctestplus-0.8.0, remotedata-0.3.2, cov-2.11.1, hypothesis-6.3.1, filter-subpackage-0.1.1, openfiles-0.5.0, astropy-header-0.1.2
collected 7 items
astroquery/ogle/tests/test_ogle.py ... [ 42%]
astroquery/ogle/tests/test_ogle_remote.py .FF [ 85%]
docs/ogle/ogle.rst s [100%]
======================================================= FAILURES =======================================================
____________________________________________________ test_ogle_list ____________________________________________________
@pytest.mark.remote_data
def test_ogle_list():
co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic')
co_list = [co, co, co]
response = Ogle.query_region(coord=co_list)
assert len(response) == 3
> assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2]
astroquery/ogle/tests/test_ogle_remote.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:1640: in __getitem__
return self.columns[item]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <TableColumns names=('RA[hr]','Dec[deg]','A_I','E(V-I)','S_E(V-I)','R_JKVI','mu','S_mu','QF','alg','dist_NG')>
item = 'RA/Lon'
def __getitem__(self, item):
"""Get items from a TableColumns object.
::
tc = TableColumns(cols=[Column(name='a'), Column(name='b'), Column(name='c')])
tc['a'] # Column('a')
tc[1] # Column('b')
tc['a', 'b'] # <TableColumns names=('a', 'b')>
tc[1:3] # <TableColumns names=('b', 'c')>
"""
if isinstance(item, str):
> return OrderedDict.__getitem__(self, item)
E KeyError: 'RA/Lon'
/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:239: KeyError
________________________________________________ test_ogle_list_values _________________________________________________
@pytest.mark.remote_data
def test_ogle_list_values():
co_list = [[0, 0, 0], [3, 3, 3]]
response = Ogle.query_region(coord=co_list)
assert len(response) == 3
> assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2]
astroquery/ogle/tests/test_ogle_remote.py:30:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:1640: in __getitem__
return self.columns[item]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <TableColumns names=('RA[hr]','Dec[deg]','A_I','E(V-I)','S_E(V-I)','R_JKVI','mu','S_mu','QF','alg','dist_NG')>
item = 'RA/Lon'
def __getitem__(self, item):
"""Get items from a TableColumns object.
::
tc = TableColumns(cols=[Column(name='a'), Column(name='b'), Column(name='c')])
tc['a'] # Column('a')
tc[1] # Column('b')
tc['a', 'b'] # <TableColumns names=('a', 'b')>
tc[1:3] # <TableColumns names=('b', 'c')>
"""
if isinstance(item, str):
> return OrderedDict.__getitem__(self, item)
E KeyError: 'RA/Lon'
/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:239: KeyError
=============================================== short test summary info ================================================
FAILED astroquery/ogle/tests/test_ogle_remote.py::test_ogle_list - KeyError: 'RA/Lon'
FAILED astroquery/ogle/tests/test_ogle_remote.py::test_ogle_list_values - KeyError: 'RA/Lon'
Also, please squash the commits to remove the irrelevant ones.
I can't seem to recreate this error on my end even after rebasing |
bsipocz
left a comment
There was a problem hiding this comment.
Rebased and fixed the failing remote tests. I think we better get this in, and further tests can be added separately.
Codecov Report
@@ Coverage Diff @@
## main #1987 +/- ##
==========================================
+ Coverage 62.84% 62.93% +0.08%
==========================================
Files 130 131 +1
Lines 16841 16917 +76
==========================================
+ Hits 10584 10646 +62
- Misses 6257 6271 +14
Continue to review full report at Codecov.
|
|
CI failure is a red herring as none of the new tests should be picked up by CI. |
|
Thank you @tinumide! |
No description provided.