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

Commite8031f4

Browse files
nejchJohnVillalovos
authored andcommitted
chore: always use context manager for file IO
1 parent019a40f commite8031f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎tests/functional/api/test_users.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def test_create_user(gl, fixture_dir):
2323

2424
avatar_url=user.avatar_url.replace("gitlab.test","localhost:8080")
2525
uploaded_avatar=requests.get(avatar_url).content
26-
assertuploaded_avatar==open(fixture_dir/"avatar.png","rb").read()
26+
withopen(fixture_dir/"avatar.png","rb")asf:
27+
assertuploaded_avatar==f.read()
2728

2829

2930
deftest_block_user(gl,user):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp