CherryPy - Pytest hangs with default "interactive" mode
See original GitHub issueI’m submitting a …
- bug report
- feature request
- question about the decisions made in the repository
Do you want to request a feature or report a bug? A “feature” request, mostly for the documentation rather than for the actual code of Cherrypy.
What is the current behavior? Running Cherrypy helper.CPWebCase tests hangs on failed assertions due to interactive mode, that can be disabled with helper.CPWebCase.interactive = False or through an enviroment variable (WEBTEST_INTERACTIVE). But I had to look at the source code of CPWebCase to understand what was going on, with trial and error. I was not able to find documentation about this behaviour until I found this page: https://schneide.blog/2017/02/06/integration-tests-with-cherrypy-and-requests/ that reported my exact problem (read the first lines of the article).
If the current behavior is a bug, please provide the steps to reproduce and if possible a screenshots and logs of the problem. If you can, show us your code.
A minimal example to reproduce the problem (tries to get a not existing url):
from cherrypy.test import helper
class TestSample(helper.CPWebCase):
def test_sample(self):
self.getPage('/')
self.assertStatus("200 OK")
The test will hang forever if “interactive” is True.
What is the expected behavior? Please tell why “interactive” is true by default and why there is no documentation about the possibility to disable it/how to disable it.
Please tell us about your environment:
- Cheroot version: 6.5.5
- CherryPy version: 18.1.2
- Python version: 3.7.3
- OS: Windows
- Browser: not relevant.
- pytest: 5.0.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
Ok! Not sure when, but I will try to do it. 😃
Thanks!