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

Added tests for sunpy/net/hek2vso/hek2vso.py #3026

Merged
merged 6 commits into from
Apr 10, 2019
Merged

Added tests for sunpy/net/hek2vso/hek2vso.py #3026

merged 6 commits into from
Apr 10, 2019

Conversation

jains8844
Copy link
Contributor

@jains8844 jains8844 commented Mar 31, 2019

Added tests for sunpy/net/hek2vso/hek2vso.py

With reference to #2970

@ghost
Copy link

ghost commented Mar 31, 2019

Thanks for the pull request @jains8844! Everything looks great!

You just can't differentiate between a robot and the very best of humans.

@nabobalis nabobalis added this to the 1.0 milestone Mar 31, 2019
@nabobalis nabobalis added Tests Affects tests in some measure net Affects the net submodule No Changelog Entry Needed labels Mar 31, 2019
@jains8844
Copy link
Contributor Author

Why are all these checks failing ?

@nabobalis
Copy link
Contributor

It would seem your changes broke something. Did you run the tests locally?

@nabobalis
Copy link
Contributor

Seems like something is wrong with this fixture:

@pytest.mark.remote_data
    @pytest.fixture(scope="function")
    def h2v_client():
>       return hek2vso.H2VClient()

@jains8844
Copy link
Contributor Author

The tests are getting passed locally for this file.

@nabobalis
Copy link
Contributor

The full traceback is:

[gw0] linux -- Python 3.6.8 /home/vsts/work/1/s/.tox/conda/bin/python

    @pytest.mark.remote_data
    @pytest.fixture(scope="function")
    def h2v_client():
>       return hek2vso.H2VClient()

../.tox/conda/lib/python3.6/site-packages/sunpy/net/tests/test_hek2vso.py:36: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../.tox/conda/lib/python3.6/site-packages/sunpy/net/hek2vso/hek2vso.py:126: in __init__
    self.vso_client = vso.VSOClient()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sunpy.net.vso.vso.VSOClient object at 0x7f1d510fcf60>, url = None, port = None, api = None

    def __init__(self, url=None, port=None, api=None):
        api = get_online_vso_url(api, url, port)
        if api is None:
>           raise ConnectionError("Cannot find an online VSO mirror.")
E           ConnectionError: Cannot find an online VSO mirror.

If it works locally, I wonder why it fails on the servers. Can you run the test suite in tox locally and see if that errors too?

@jains8844
Copy link
Contributor Author

Okay I'm running. Will update once I'm done with that.

@jains8844
Copy link
Contributor Author

jains8844 commented Mar 31, 2019

The tests are failing without including remote_data mark. Can't I have more than one pytest decorator for a function ?

@nabobalis
Copy link
Contributor

You should be able to

@jains8844
Copy link
Contributor Author

Yeah got it. I missed a marker for a class function.

@pep8speaks
Copy link

pep8speaks commented Mar 31, 2019

Hello @jains8844! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 102:1: E302 expected 2 blank lines, found 1
Line 115:1: E302 expected 2 blank lines, found 1
Line 145:1: E302 expected 2 blank lines, found 1

Comment last updated at 2019-04-08 20:49:23 UTC

@jains8844
Copy link
Contributor Author

I've fixed the code still the checks are failing ?
The errors displayed in the checks doesn't belong to this test I guess

@nabobalis
Copy link
Contributor

Yes the errors seem to be unrelated to the PR. The servers should be back now.

@nabobalis nabobalis added the Needs Review Needs reviews before merge label Apr 2, 2019
@jains8844
Copy link
Contributor Author

Are there some changes required in this PR ?

@nabobalis nabobalis added [CodeFix] and removed Needs Review Needs reviews before merge labels Apr 10, 2019
@nabobalis nabobalis merged commit f9729bf into sunpy:master Apr 10, 2019
@nabobalis
Copy link
Contributor

Thanks @jains8844

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Affects the net submodule No Changelog Entry Needed Tests Affects tests in some measure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants