summaryrefslogtreecommitdiff
path: root/tests/functional/l/logging/logging_fstring_interpolation_py37.py
blob: d08424eb0470d215ca80a20c7954eb0d596ded18 (plain)
1
2
3
4
5
6
7
8
9
10
11
"""Tests for logging-fstring-interpolation with f-strings"""
import logging

VAR = "string"
logging.error(f"{VAR}")  # [logging-fstring-interpolation]

WORLD = "world"
logging.error(f'Hello {WORLD}')  # [logging-fstring-interpolation]

logging.error(f'Hello %s', 'World!')  # [f-string-without-interpolation]
logging.error(f'Hello %d', 1)  # [f-string-without-interpolation]