-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CI/TST: Error on PytestUnraisableExceptionWarning instead of using psutil to check open resources #51443
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
CI/TST: Error on PytestUnraisableExceptionWarning instead of using psutil to check open resources #51443
Changes from all commits
8df59ed
f903f62
72b70cc
5c24bdd
a046267
844f277
cfdd50f
edaf9db
648e83c
d5d269b
bd490be
8401c79
bae2fc0
6b80a8e
4c2ef83
b99158c
8c9cf4e
efb667b
1daf6d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import pytest | ||
|
||
from pandas.compat import is_platform_windows | ||
import pandas.util._test_decorators as td | ||
|
||
import pandas._testing as tm | ||
|
||
from pandas.io.parsers import read_csv | ||
|
@@ -42,26 +39,3 @@ def read_ext(request): | |
Valid extensions for reading Excel files. | ||
""" | ||
return request.param | ||
|
||
|
||
# Checking for file leaks can hang on Windows CI | ||
@pytest.fixture(autouse=not is_platform_windows()) | ||
def check_for_file_leaks(): | ||
""" | ||
Fixture to run around every test to ensure that we are not leaking files. | ||
|
||
See also | ||
-------- | ||
_test_decorators.check_file_leaks | ||
""" | ||
# GH#30162 | ||
psutil = td.safe_import("psutil") | ||
if not psutil: | ||
yield | ||
|
||
else: | ||
proc = psutil.Process() | ||
flist = proc.open_files() | ||
yield | ||
flist2 = proc.open_files() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. documenting in case we wind up keeping this: looks like all of the flaky failures have raddr.port of either 5432 or 3306 (mostly 5432), which correspond to postgres and mysql defaults, respectively. We could filter those out here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW I have seen the port 443 show up a few times too |
||
assert flist == flist2 |
Uh oh!
There was an error while loading. Please reload this page.