summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
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]*)")