Skip to content
Myr

test_compat.py

This file

Path

tests/test_compat.py

31 lines · 1.0 KiB · Python

Last changed by

Merge pull request #1532 from pallets/drop-python2David Lordbefore adoption97de2c9

History of this file

Take it

The walk stopped after 200 commits: lines older than 5210849 point at it.

Merge branch '6.x-maintenance'Armin Ronacherbefore adoption7404b06

line 1why, one step back
1import pytest

Merge pull request #806 from stopthatcow/feature/790Markus Unterwaditzerbefore adoption5210849

line 2why, one step back
2

Merge branch '7.x'David Lordbefore adoption7239794

lines 3–4why, one step back
3from click._compat import should_strip_ansi
4from click._compat import WIN

Merge pull request #806 from stopthatcow/feature/790Markus Unterwaditzerbefore adoption5210849

line 5why, one step back
5

Merge branch '7.x'David Lordbefore adoption7239794

line 6why, one step back
6

Merge pull request #806 from stopthatcow/feature/790Markus Unterwaditzerbefore adoption5210849

lines 7–8why, one step back
7def test_bash_func_name():
8 from click._bashcomplete import get_completion_script

Merge branch '7.x'David Lordbefore adoptiona438322

line 9why, one step back
9

Merge branch '7.x'David Lordbefore adoption7239794

lines 10–12why, one step back
10 script = get_completion_script("foo-bar baz_blah", "_COMPLETE_VAR", "bash").strip()
11 assert script.startswith("_foo_barbaz_blah_completion()")12 assert "_COMPLETE_VAR=complete $1" in script

Merge branch '7.x'David Lordbefore adoptiona438322

line 13why, one step back
13

Merge branch '7.x'David Lordbefore adoption7239794

line 14why, one step back
14

Merge pull request #1348 from rnc/masterDavid Lordbefore adoption7d11997

lines 15–16why, one step back
15def test_zsh_func_name():
16 from click._bashcomplete import get_completion_script

Merge branch '7.x'David Lordbefore adoption7239794

lines 17–21why, one step back
17
18 script = get_completion_script("foo-bar", "_COMPLETE_VAR", "zsh").strip()19 assert script.startswith("#compdef foo-bar")20 assert "compdef _foo_bar_completion foo-bar;" in script21 assert "(( ! $+commands[foo-bar] )) && return 1" in script

Merge pull request #1348 from rnc/masterDavid Lordbefore adoption7d11997

lines 22–23why, one step back
22
23

Merge branch '7.x'David Lordbefore adoptiona438322

lines 24–25why, one step back
24@pytest.mark.xfail(WIN, reason="Jupyter not tested/supported on Windows")
25def test_is_jupyter_kernel_output():

Merge pull request #1532 from pallets/drop-python2David Lordbefore adoption97de2c9

line 26why, one step back
26 class JupyterKernelFakeStream:

Merge branch '7.x'David Lordbefore adoptiona438322

lines 27–31why, one step back
27 pass
2829 # implementation detail, aka cheapskate test30 JupyterKernelFakeStream.__module__ = "ipykernel.faked"31 assert not should_strip_ansi(stream=JupyterKernelFakeStream())