1import pytest
2from httpie.context import Environment
3
4from .utils import MockEnvironment, http
5from httpie.compat import is_windows
6
7
8@pytest.mark.skipif(not is_windows, reason='windows-only')
9class TestWindowsOnly:
10
11    @pytest.mark.skipif(True,
12                        reason='this test for some reason kills the process')
13    def test_windows_colorized_output(self, httpbin):
14        # Spits out the colorized output.
15        http(httpbin.url + '/get', env=Environment())
16
17
18class TestFakeWindows:
19    def test_output_file_pretty_not_allowed_on_windows(self, tmp_path, httpbin):
20        env = MockEnvironment(is_windows=True)
21        output_file = tmp_path / 'test_output_file_pretty_not_allowed_on_windows'
22        r = http('--output', str(output_file),
23                 '--pretty=all', 'GET', httpbin.url + '/get',
24                 env=env, tolerate_error_exit_status=True)
25        assert 'Only terminal output can be colorized on Windows' in r.stderr
26