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

Setup/teardown doesn't work as expected #10084

Closed
wangwenfeng1130 opened this issue Jun 27, 2022 · 2 comments
Closed

Setup/teardown doesn't work as expected #10084

wangwenfeng1130 opened this issue Jun 27, 2022 · 2 comments
Labels
status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity type: regression indicates a problem that was introduced in a release which was working previously

Comments

@wangwenfeng1130
Copy link

wangwenfeng1130 commented Jun 27, 2022

After I upgrade pytest from 6.2.5 to 7.0 ( I tested 7.0.0 and 7.1.2), setup/teardown in my frameworks does not work as expected.
in our framework, we have a base test to setup test environment, all tests inherent from base test, and we have setup/teardown in most of tests.
For setup:
Code in test setup are executed before the fixture in base test marked as @pytest.fixture(autouse=True), after I mark the setup in test as @pytest.fixture(autouse=True), then the fixture in base test is executed before the setup.
For teardown:
After the test is executed, the teardown is called, but looks like we lost all environment info when teardown is called, it is failed by:

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=38921): Max retries exceeded with url: /session/d891b3026ea1a85b64dd96d75cf6c245/window/handles (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc00321ed60>: Failed to establish a new connection: [Errno 111] Connection refused'))

@RonnyPfannschmidt RonnyPfannschmidt added status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity type: regression indicates a problem that was introduced in a release which was working previously labels Jun 27, 2022
@RonnyPfannschmidt
Copy link
Member

Without any example /reproducer we have no way of understanding the issue

@RonnyPfannschmidt
Copy link
Member

closing as no actionable details provided, happy to reopen if more debugging data is provided

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity type: regression indicates a problem that was introduced in a release which was working previously
Projects
None yet
Development

No branches or pull requests

2 participants