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

Fix test_wps_parser and test_wps_resolve_rules #72

Open
eyvorchuk opened this issue Dec 10, 2021 · 0 comments
Open

Fix test_wps_parser and test_wps_resolve_rules #72

eyvorchuk opened this issue Dec 10, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@eyvorchuk
Copy link
Contributor

Upon running the make installation or running pytest, test_wps_parser and test_wps_resolve_rules will fail and should be fixed when possible. However, the associated notebook demos work properly. The first test yields the following error:

________________________ test_wps_parser[conditions0] _________________________

conditions = ['(temp_djf_iamean_s100p_hist < 5)', '(temp_djf_iamean_s0p_hist < -6)', '(temp_djf_iamean_s0p_hist < -6) && (temp_djf_iamean_s100p_hist > -6)']

    @pytest.mark.parametrize(
        ("conditions"),
        [
            [
                "(temp_djf_iamean_s100p_hist < 5)",
                "(temp_djf_iamean_s0p_hist < -6)",
                "(temp_djf_iamean_s0p_hist < -6) && (temp_djf_iamean_s100p_hist > -6)",
            ]
        ],
    )
    def test_wps_parser(conditions):
        datainput = build_condition_input(conditions)
>       run_wps_process(Parser(), datainput)

tests/test_wps_parser.py:30: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/sandpiper-venv/lib/python3.8/site-packages/wps_tools/testing.py:104: in run_wps_process
    resp = client.get(
/tmp/sandpiper-venv/lib/python3.8/site-packages/wps_tools/testing.py:33: in get
    return super(WpsTestClient, self).get(query)
/tmp/sandpiper-venv/lib/python3.8/site-packages/werkzeug/test.py:1129: in get
    return self.open(*args, **kw)
/tmp/sandpiper-venv/lib/python3.8/site-packages/werkzeug/test.py:1075: in open
    response = self.response_wrapper(*response, request=request)
/tmp/sandpiper-venv/lib/python3.8/site-packages/werkzeug/test.py:1297: in __init__
    super().__init__(response, status, headers, **kwargs)
/tmp/sandpiper-venv/lib/python3.8/site-packages/pywps/tests.py:118: in __init__
    self.xml = etree.fromstring(self.get_data())
/tmp/sandpiper-venv/lib/python3.8/site-packages/pywps/xml_util.py:12: in fromstring
    return _etree.fromstring(text, parser=PARSER)
src/lxml/etree.pyx:3237: in lxml.etree.fromstring
    ???
src/lxml/parser.pxi:1896: in lxml.etree._parseMemoryDocument
    ???
src/lxml/parser.pxi:1784: in lxml.etree._parseDoc
    ???
src/lxml/parser.pxi:1141: in lxml.etree._BaseParser._parseDoc
    ???
src/lxml/parser.pxi:615: in lxml.etree._ParserContext._handleParseResultDoc
    ???
src/lxml/parser.pxi:725: in lxml.etree._handleParseResult
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E     File "<string>", line 17
E   lxml.etree.XMLSyntaxError: StartTag: invalid element name, line 17, column 119

src/lxml/parser.pxi:654: XMLSyntaxError

And each test_wps_resolve_rules test yields the following error:

Traceback (most recent call last):
  File "/tmp/sandpiper-venv/lib/python3.8/site-packages/pywps/app/Process.py", line 250, in _run_process
    self.handler(wps_request, wps_response)  # the user must update the wps_response.
  File "/home/eyvorchuk/Documents/sandpiper/sandpiper/processes/wps_resolve_rules.py", line 122, in _handler
    connection_string = update_connection(connection_string)
  File "/home/eyvorchuk/Documents/sandpiper/sandpiper/utils.py", line 31, in update_connection
    raise ProcessError(
pywps.app.exceptions.ProcessError: No connection_string found. You must set the connection_string through the environment or as a parameter.
@eyvorchuk eyvorchuk added the bug Something isn't working label Dec 10, 2021
@eyvorchuk eyvorchuk self-assigned this Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant