@@ -29,26 +29,26 @@ def test_use_color_always():
2929
3030
3131def test_use_color_no_tty ():
32- with mock .patch .object (sys .stdout , 'isatty' , return_value = False ):
32+ with mock .patch .object (sys .stderr , 'isatty' , return_value = False ):
3333 assert use_color ('auto' ) is False
3434
3535
3636def test_use_color_tty_with_color_support ():
37- with mock .patch .object (sys .stdout , 'isatty' , return_value = True ):
37+ with mock .patch .object (sys .stderr , 'isatty' , return_value = True ):
3838 with mock .patch ('pre_commit.color.terminal_supports_color' , True ):
3939 with envcontext .envcontext ((('TERM' , envcontext .UNSET ),)):
4040 assert use_color ('auto' ) is True
4141
4242
4343def test_use_color_tty_without_color_support ():
44- with mock .patch .object (sys .stdout , 'isatty' , return_value = True ):
44+ with mock .patch .object (sys .stderr , 'isatty' , return_value = True ):
4545 with mock .patch ('pre_commit.color.terminal_supports_color' , False ):
4646 with envcontext .envcontext ((('TERM' , envcontext .UNSET ),)):
4747 assert use_color ('auto' ) is False
4848
4949
5050def test_use_color_dumb_term ():
51- with mock .patch .object (sys .stdout , 'isatty' , return_value = True ):
51+ with mock .patch .object (sys .stderr , 'isatty' , return_value = True ):
5252 with mock .patch ('pre_commit.color.terminal_supports_color' , True ):
5353 with envcontext .envcontext ((('TERM' , 'dumb' ),)):
5454 assert use_color ('auto' ) is False
0 commit comments