summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2019-07-10 09:44:14 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2019-07-10 09:44:14 +0200
commit95dbb7178c44dbc1175ed5e279dab8b7bb02470a (patch)
tree631cf94b0b48085cf940160bfc065eea5cc71f9e
parentbc710340c8af251fcacfc9f6de6c7ce56a4b7202 (diff)
downloadastroid-git-95dbb7178c44dbc1175ed5e279dab8b7bb02470a.tar.gz
Add a simple test for f-string debug mode
-rw-r--r--astroid/tests/unittest_nodes.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/astroid/tests/unittest_nodes.py b/astroid/tests/unittest_nodes.py
index 7b8afdb1..316d9a15 100644
--- a/astroid/tests/unittest_nodes.py
+++ b/astroid/tests/unittest_nodes.py
@@ -1194,5 +1194,11 @@ def test_get_doc():
assert node.doc is None
+def test_parse_fstring_debug_mode():
+ node = astroid.extract_node('f"{3=}"')
+ assert isinstance(node, nodes.JoinedStr)
+ assert node.as_string() == "f'3={3}'"
+
+
if __name__ == "__main__":
unittest.main()