aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/click/py3/tests/test_compat.py
blob: 0e2e424cb2a18694aed3f71126d2dec2b9618f66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
from click._compat import should_strip_ansi


def test_is_jupyter_kernel_output():
    class JupyterKernelFakeStream:
        pass

    # implementation detail, aka cheapskate test
    JupyterKernelFakeStream.__module__ = "ipykernel.faked"
    assert not should_strip_ansi(stream=JupyterKernelFakeStream())