astropy / pytest-remotedata

Pytest plugin to control whether tests are run that have remote data
BSD 3-Clause "New" or "Revised" License
23 stars 15 forks source link

BUG: remote_data=astropy is broken #44

Closed pllim closed 4 years ago

pllim commented 5 years ago

@bsipocz reported that --remote-data=astropy no longer works as expected. I think the hosts need to be updated to reflect the primary host switch, @eteq or @astrofrog ?

https://github.com/astropy/pytest-remotedata/blob/371dd7d3f351fb0f672d1a7a9fb471ce63cbae07/pytest_remotedata/disable_internet.py#L15-L17

pllim commented 4 years ago

@bsipocz , I don't remember the details now. How was it not working as expected. Do you still remember?

bsipocz commented 4 years ago

nope, I cannot recall any details here, I suppose it wasn't running any of those remote astropy tests?

bsipocz commented 4 years ago

OK, so running pytest -P coordinates --remote-data=x where x is ['any', 'astropy', 'github, 'none'] seems to work for astropy reasonably well. It skips, 0, 32, 35, 35 tests.

So I think the 'astropy' option is fixed, though I'm a bit confused now about 'github', as all those astropy ones should be available from github, too.

pllim commented 4 years ago

Yes, based on

https://github.com/astropy/pytest-remotedata/blob/5585d0be4ca74a975826ad65e3973b25a43f2baa/pytest_remotedata/disable_internet.py#L15-L17

'astropy' also includes 'github', but not the other way around. So, if everything works correctly, the conclusion from the numbers is that coordinates has 35 tests total that access internet in some way, 32 of them access Astropy data server, but none access just the GitHub part?

bsipocz commented 4 years ago

Yes, that indeed seems to be the case. I suppose my confusion is coming from the fact that data.astropy.org is in fact the github astropy-data repo, yet with 'github' it's not accessed, but that should be an astropy-core issue and not a plugin one

pllim commented 4 years ago

I don't remember what the GITHUB_HOSTS was intended for, but given that astropy works, shall we close this issue?

bsipocz commented 4 years ago

yes, we can close it. I think the github originally meant to cover the astropy-data like repos, but it doesn't seem to ever worked that way.