← 返回首页
chore: resolve DeprecationWarning message in CI run · python-gitlab/python-gitlab@accd5aa · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

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

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Commit accd5aa

Browse files
authored andcommitted
chore: resolve DeprecationWarning message in CI run
Catch the DeprecationWarning in our test, as we expect it.
1 parent 95db680 commit accd5aa

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/functional/api/test_snippets.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ def test_snippets(gl):
2424
assert content.decode() == "import gitlab"
2525

2626
all_snippets = gl.snippets.list_all(get_all=True)
27-
public_snippets = gl.snippets.public(get_all=True)
27+
with pytest.warns(
28+
DeprecationWarning, match=r"Gitlab.snippets.public\(\) is deprecated"
29+
):
30+
public_snippets = gl.snippets.public(get_all=True)
2831
list_public_snippets = gl.snippets.list_public(get_all=True)
2932
assert isinstance(all_snippets, list)
3033
assert isinstance(list_public_snippets, list)

0 commit comments

Comments
 (0)

Footer

© 2026 GitHub, Inc.