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

Either fix internet_off or add a new decorator to disable internet #17

Open
drdavella opened this issue Nov 7, 2017 · 2 comments
Open
Assignees

Comments

@drdavella
Copy link
Contributor

Currently the internet_off decorator indicates that a test will only run if --remote-data is not provided or --remote-data=none. It would be more useful to have a decorator that actually disables network access for the scope of that test.

To accomplish this we could either update internet_off, or we could add a new decorator (maybe disable_internet). As far as I know, no one is using internet_off yet, so we probably don't have to worry about API breakage.

@drdavella
Copy link
Contributor Author

It will be necessary to update the astropy testing documentation if/when this change is made.

@pllim
Copy link
Member

pllim commented Apr 8, 2020

This doesn't behave as expected in pytest 5.3 either. Works when I run it manually in interpreter but not when I invoke the test with pytest testfile. 🤷‍♀

with no_internet():
    something_that_downloads()

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

No branches or pull requests

2 participants