jrester / tesla_powerwall

Python API for Tesla Powerwall
MIT License
73 stars 25 forks source link

test_parse_endpoint breaks with recent yarl versions #68

Open mweinelt opened 2 weeks ago

mweinelt commented 2 weeks ago

The following test broke between yarl 1.9 and 1.10.

======================================================================
FAIL: test_parse_endpoint (tests.unit.test_api.TestAPI.test_parse_endpoint)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/unittest/async_case.py", line 90, in _callTestMethod
    if self._callMaybeAsync(method) is not None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/unittest/async_case.py", line 112, in _callMaybeAsync
    return self._asyncioRunner.run(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/tmp/tesla_powerwall/tests/unit/test_api.py", line 38, in test_parse_endpoint
    self.assertEqual(api.url(""), URL(ENDPOINT.rstrip("/")))
AssertionError: URL('https://1.1.1.1/api/') != URL('https://1.1.1.1/api')
jrester commented 2 weeks ago

Thanks for your report! I will take a look at this.