Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbd4dfb4

Browse files
chore: Only check for our UserWarning
The GitHub CI is showing a ResourceWarning, causing our test to fail.Update test to only look for our UserWarning which should not appear.What was seen when debugging the GitHub CI:{message: ResourceWarning( "unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 50862), raddr=('127.0.0.1', 8080)>" ), category: 'ResourceWarning', filename: '/home/runner/work/python-gitlab/python-gitlab/.tox/api_func_v4/lib/python3.10/site-packages/urllib3/poolmanager.py', lineno: 271, line: None}
1 parent98f1956 commitbd4dfb4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎tests/functional/api/test_gitlab.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,11 @@ def test_list_all_false_nowarning(gl, recwarn):
240240
deftest_list_all_true_nowarning(gl,get_all_kwargs,recwarn):
241241
"""Using `get_all=True` will disable the warning"""
242242
items=gl.gitlabciymls.list(**get_all_kwargs)
243-
assertnotrecwarn
243+
forwarninrecwarn:
244+
ifissubclass(warn.category,UserWarning):
245+
# Our warning has a link to the docs in it, make sure we don't have
246+
# that.
247+
assert"python-gitlab.readthedocs.io"notinstr(warn.message)
244248
assertlen(items)>20
245249

246250

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp