kivy / kivy/telenium

tearDownClass() failure

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
68
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Sometimes (about 1 time in several runs) tests end with a `JSONDecodeError`. Here is the full trace:

```
Failure
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/suite.py", line 290, in _tearDownPreviousClass
tearDownClass()
File "/Users/denisdarahan/PycharmProjects/NewProject/venv/lib/python3.9/site-packages/telenium/tests.py", line 126, in tearDownClass
cls.stop_process()
File "/Users/denisdarahan/PycharmProjects/NewProject/venv/lib/python3.9/site-packages/telenium/tests.py", line 114, in stop_process
cls.cli.app_quit()
File "/Users/denisdarahan/PycharmProjects/NewProject/venv/lib/python3.9/site-packages/telenium/client.py", line 53, in __call__
response.json()["error"]["message"])
File "/Users/denisdarahan/PycharmProjects/NewProject/venv/lib/python3.9/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```

Actually it happens because `response.text` is an empty line.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading telenium/tests.py at stop_process and telenium/client.py at __call__, as identified in the traceback, and inspect how the app_quit response is handled. Reproduce the intermittent tearDownClass failure in the test suite; done means an empty response no longer causes JSONDecodeError during cleanup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.