File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,11 @@ def patcher_cli_name(
41
41
42
42
class TestInit :
43
43
@pytest .fixture
44
- def runner_noenv (self , credentials : FakeCredentials ) -> Runner :
45
- """Runner with no env variables set."""
46
- return Runner (credentials .SHARECODE )
44
+ def runner_noenv (self , runner : Runner , monkeypatch : pytest .MonkeyPatch ) -> Runner :
45
+ """Runner with no auth env variables set."""
46
+ monkeypatch .delenv (cli .API_USER_ENV_VAR )
47
+ monkeypatch .delenv (cli .API_KEY_ENV_VAR )
48
+ return runner
47
49
48
50
@pytest .mark .parametrize ("valid" , [True , False ])
49
51
def test_init (
Original file line number Diff line number Diff line change @@ -79,9 +79,10 @@ def run(self, *args: str) -> click.testing.Result:
79
79
80
80
@pytest .fixture
81
81
def runner (monkeypatch : pytest .MonkeyPatch , credentials : FakeCredentials ) -> Runner :
82
- rich .reconfigure (width = 80 , no_color = True )
83
- monkeypatch .setenv ("COLUMNS" , "80" ) # for future console instances
84
- monkeypatch .setenv ("NO_COLOR" , "1" )
82
+ rich .reconfigure (width = 80 , force_terminal = False )
83
+ # for future console instances
84
+ monkeypatch .setenv ("COLUMNS" , "80" )
85
+ monkeypatch .setenv ("TERM" , "dumb" )
85
86
monkeypatch .setenv (cli .API_USER_ENV_VAR , credentials .USERNAME )
86
87
monkeypatch .setenv (cli .API_KEY_ENV_VAR , credentials .API_KEY )
87
88
return Runner (credentials .SHARECODE )
You can’t perform that action at this time.
0 commit comments