test_compat.py 307 B

12345678910
  1. from click._compat import should_strip_ansi
  2. def test_is_jupyter_kernel_output():
  3. class JupyterKernelFakeStream:
  4. pass
  5. # implementation detail, aka cheapskate test
  6. JupyterKernelFakeStream.__module__ = "ipykernel.faked"
  7. assert not should_strip_ansi(stream=JupyterKernelFakeStream())