File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 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(
4141
4242class TestInit :
4343 @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
4749
4850 @pytest .mark .parametrize ("valid" , [True , False ])
4951 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:
7979
8080@pytest .fixture
8181def 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" )
8586 monkeypatch .setenv (cli .API_USER_ENV_VAR , credentials .USERNAME )
8687 monkeypatch .setenv (cli .API_KEY_ENV_VAR , credentials .API_KEY )
8788 return Runner (credentials .SHARECODE )
You can’t perform that action at this time.
0 commit comments