diff options
| author | John Vandenberg <jayvdb@gmail.com> | 2015-11-08 15:03:31 +1100 |
|---|---|---|
| committer | John Vandenberg <jayvdb@gmail.com> | 2015-11-08 15:29:27 +1100 |
| commit | 9a4d45c12e86cbb9effd749bd13ba48927063c23 (patch) | |
| tree | bf129025e50fd373e3e0f0582be4374de53b3544 /pyflakes/test | |
| parent | 69a715dff7243eda61f0bf5f16b8a37afb5b7ac6 (diff) | |
| download | pyflakes-9a4d45c12e86cbb9effd749bd13ba48927063c23.tar.gz | |
PEP 498 f-strings support
PEP 498 f-strings cause pyflakes to crash with
AttributeError: 'Checker' object has no attribute 'FORMATTEDVALUE'
Diffstat (limited to 'pyflakes/test')
| -rw-r--r-- | pyflakes/test/test_other.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pyflakes/test/test_other.py b/pyflakes/test/test_other.py index 384c4b3..3167a1d 100644 --- a/pyflakes/test/test_other.py +++ b/pyflakes/test/test_other.py @@ -989,6 +989,14 @@ class TestUnusedAssignment(TestCase): """Do not crash on lone "return".""" self.flakes('return 2') + @skipIf(version_info < (3, 6), 'new in Python 3.6') + def test_f_string(self): + """Test PEP 498 f-strings are treated as a usage.""" + self.flakes(''' + baz = 0 + print(f'\x7b4*baz\N{RIGHT CURLY BRACKET}') + ''') + class TestAsyncStatements(TestCase): |
