aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/prompt-toolkit/py3/tests/test_document.py
diff options
context:
space:
mode:
authormonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
committermonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/python/prompt-toolkit/py3/tests/test_document.py
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
downloadydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz
fix ya.make
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/tests/test_document.py')
-rw-r--r--contrib/python/prompt-toolkit/py3/tests/test_document.py67
1 files changed, 0 insertions, 67 deletions
diff --git a/contrib/python/prompt-toolkit/py3/tests/test_document.py b/contrib/python/prompt-toolkit/py3/tests/test_document.py
deleted file mode 100644
index ba65ffc834..0000000000
--- a/contrib/python/prompt-toolkit/py3/tests/test_document.py
+++ /dev/null
@@ -1,67 +0,0 @@
-import pytest
-
-from prompt_toolkit.document import Document
-
-
-@pytest.fixture
-def document():
- return Document(
- "line 1\n" + "line 2\n" + "line 3\n" + "line 4\n", len("line 1\n" + "lin")
- )
-
-
-def test_current_char(document):
- assert document.current_char == "e"
- assert document.char_before_cursor == "n"
-
-
-def test_text_before_cursor(document):
- assert document.text_before_cursor == "line 1\nlin"
-
-
-def test_text_after_cursor(document):
- assert document.text_after_cursor == "e 2\n" + "line 3\n" + "line 4\n"
-
-
-def test_lines(document):
- assert document.lines == ["line 1", "line 2", "line 3", "line 4", ""]
-
-
-def test_line_count(document):
- assert document.line_count == 5
-
-
-def test_current_line_before_cursor(document):
- assert document.current_line_before_cursor == "lin"
-
-
-def test_current_line_after_cursor(document):
- assert document.current_line_after_cursor == "e 2"
-
-
-def test_current_line(document):
- assert document.current_line == "line 2"
-
-
-def test_cursor_position(document):
- assert document.cursor_position_row == 1
- assert document.cursor_position_col == 3
-
- d = Document("", 0)
- assert d.cursor_position_row == 0
- assert d.cursor_position_col == 0
-
-
-def test_translate_index_to_position(document):
- pos = document.translate_index_to_position(len("line 1\nline 2\nlin"))
-
- assert pos[0] == 2
- assert pos[1] == 3
-
- pos = document.translate_index_to_position(0)
- assert pos == (0, 0)
-
-
-def test_is_cursor_at_the_end(document):
- assert Document("hello", 5).is_cursor_at_the_end
- assert not Document("hello", 4).is_cursor_at_the_end