Skip to content

Commit 71bceb4

Browse files
Try to use mock.any for env in test_status.py. Update timeout value to 20.0.
1 parent c29b4df commit 71bceb4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

jupyterlab_git/tests/test_status.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
import os
5+
from unittest.mock import ANY
66

77
# local lib
88
from jupyterlab_git.git import Git
@@ -376,8 +376,8 @@ async def test_status(tmp_path, output, diff_output, expected):
376376
call(
377377
["git", "status", "--porcelain", "-b", "-u", "-z"],
378378
cwd=str(repository),
379-
timeout=20,
380-
env=os.environ.copy(),
379+
timeout=20.0,
380+
env=ANY,
381381
username=None,
382382
password=None,
383383
is_binary=False,
@@ -392,44 +392,44 @@ async def test_status(tmp_path, output, diff_output, expected):
392392
"4b825dc642cb6eb9a060e54bf8d69288fbee4904",
393393
],
394394
cwd=str(repository),
395-
timeout=20,
396-
env=os.environ.copy(),
395+
timeout=20.0,
396+
env=ANY,
397397
username=None,
398398
password=None,
399399
is_binary=False,
400400
),
401401
call(
402402
["git", "show", "--quiet", "CHERRY_PICK_HEAD"],
403403
cwd=str(repository),
404-
timeout=20,
405-
env=os.environ.copy(),
404+
timeout=20.0,
405+
env=ANY,
406406
username=None,
407407
password=None,
408408
is_binary=False,
409409
),
410410
call(
411411
["git", "show", "--quiet", "MERGE_HEAD"],
412412
cwd=str(repository),
413-
timeout=20,
414-
env=os.environ.copy(),
413+
timeout=20.0,
414+
env=ANY,
415415
username=None,
416416
password=None,
417417
is_binary=False,
418418
),
419419
call(
420420
["git", "rev-parse", "--git-path", "rebase-merge"],
421421
cwd=str(repository),
422-
timeout=20,
423-
env=os.environ.copy(),
422+
timeout=20.0,
423+
env=ANY,
424424
username=None,
425425
password=None,
426426
is_binary=False,
427427
),
428428
call(
429429
["git", "rev-parse", "--git-path", "rebase-apply"],
430430
cwd=str(repository),
431-
timeout=20,
432-
env=os.environ.copy(),
431+
timeout=20.0,
432+
env=ANY,
433433
username=None,
434434
password=None,
435435
is_binary=False,

0 commit comments

Comments
 (0)