summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 04:45:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 04:45:15 +0000
commit6dc655898df34ad424dfc467a8b276fdf31bd791 (patch)
tree0a3f3addbfc0b81e3850a628afe62ce830a8b0f3 /tests
parentReleasing progress-linux version 3.0.43-2~progress7.99u1. (diff)
downloadprompt-toolkit-6dc655898df34ad424dfc467a8b276fdf31bd791.tar.xz
prompt-toolkit-6dc655898df34ad424dfc467a8b276fdf31bd791.zip
Merging upstream version 3.0.46.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cli.py1
-rw-r--r--tests/test_print_formatted_text.py1
-rw-r--r--tests/test_regular_languages.py8
3 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 3a16e9f..c155325 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -2,6 +2,7 @@
These are almost end-to-end tests. They create a Prompt, feed it with some
input and check the result.
"""
+
from __future__ import annotations
from functools import partial
diff --git a/tests/test_print_formatted_text.py b/tests/test_print_formatted_text.py
index 26c7265..7d0e99a 100644
--- a/tests/test_print_formatted_text.py
+++ b/tests/test_print_formatted_text.py
@@ -1,6 +1,7 @@
"""
Test the `print` function.
"""
+
from __future__ import annotations
import pytest
diff --git a/tests/test_regular_languages.py b/tests/test_regular_languages.py
index deef6b8..3d55dbc 100644
--- a/tests/test_regular_languages.py
+++ b/tests/test_regular_languages.py
@@ -78,13 +78,13 @@ def test_prefix():
def test_completer():
class completer1(Completer):
def get_completions(self, document, complete_event):
- yield Completion("before-%s-after" % document.text, -len(document.text))
- yield Completion("before-%s-after-B" % document.text, -len(document.text))
+ yield Completion(f"before-{document.text}-after", -len(document.text))
+ yield Completion(f"before-{document.text}-after-B", -len(document.text))
class completer2(Completer):
def get_completions(self, document, complete_event):
- yield Completion("before2-%s-after2" % document.text, -len(document.text))
- yield Completion("before2-%s-after2-B" % document.text, -len(document.text))
+ yield Completion(f"before2-{document.text}-after2", -len(document.text))
+ yield Completion(f"before2-{document.text}-after2-B", -len(document.text))
# Create grammar. "var1" + "whitespace" + "var2"
g = compile(r"(?P<var1>[a-z]*) \s+ (?P<var2>[a-z]*)")