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

Commit2ac2a68

Browse files
authored
Merge pull request#1792 from python-gitlab/jlvillal/cli_test
chore: fix functional test failure if config present
2 parentsa3eafab +c8256a5 commit2ac2a68

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎tests/functional/cli/test_cli.py‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
importpytest
44
importresponses
55

6-
fromgitlabimport__version__
6+
fromgitlabimport__version__,config
77

88

99
@pytest.fixture
@@ -30,9 +30,13 @@ def test_version(script_runner):
3030

3131

3232
@pytest.mark.script_launch_mode("inprocess")
33-
deftest_defaults_to_gitlab_com(script_runner,resp_get_project):
34-
# Runs in-process to intercept requests to gitlab.com
35-
ret=script_runner.run("gitlab","project","get","--id","1")
33+
deftest_defaults_to_gitlab_com(script_runner,resp_get_project,monkeypatch):
34+
withmonkeypatch.context()asm:
35+
# Ensure we don't pick up any config files that may already exist in the local
36+
# environment.
37+
m.setattr(config,"_DEFAULT_FILES", [])
38+
# Runs in-process to intercept requests to gitlab.com
39+
ret=script_runner.run("gitlab","project","get","--id","1")
3640
assertret.success
3741
assert"id: 1"inret.stdout
3842

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp