summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRune Riksted <runeriksted@gitlab.gnome.org>2022-01-04 16:04:17 -0800
committerChristian Hergert <chergert@redhat.com>2022-01-04 16:22:49 -0800
commit2e6c81ff0508d2a000d74345d2b6628f98b775dd (patch)
treecdfaa0139598f59f7f1c7e96cf1c3041520e3b2c /tests
parentd0b3217fc275b04e21345d74f19977be4c52f397 (diff)
downloadgtksourceview-2e6c81ff0508d2a000d74345d2b6628f98b775dd.tar.gz
python3.lang: add support for Python f-strings
Fixes #196
Diffstat (limited to 'tests')
-rw-r--r--tests/syntax-highlighting/file.py315
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/syntax-highlighting/file.py3 b/tests/syntax-highlighting/file.py3
new file mode 100644
index 00000000..7b7a0160
--- /dev/null
+++ b/tests/syntax-highlighting/file.py3
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import gi
+
+gi.require_version('Gtk', '4.0')
+
+from gi.repository import GLib, GObject, Gtk
+
+my_fstring = f'this is a fstring {something("here")}'
+my_fstring = f"this is a fstring {other('stuff'}"
+
+class MyClass(GObject.Object):
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwarg)
+