summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sqlite3
diff options
context:
space:
mode:
authorRodolfo M. Pereira <rodolfomp123@gmail.com>2023-04-24 23:24:49 (GMT)
committerGitHub <noreply@github.com>2023-04-24 23:24:49 (GMT)
commit8291ae31ddc2f935b8ec60f3d5f3825f78ccf244 (patch)
treec20f450d55fbf588908da9e7048281a186709be1 /Lib/test/test_sqlite3
parentdf3173d28ef25a0f97d2cca8cf4e64e062a08d06 (diff)
downloadcpython-8291ae31ddc2f935b8ec60f3d5f3825f78ccf244.zip
cpython-8291ae31ddc2f935b8ec60f3d5f3825f78ccf244.tar.gz
cpython-8291ae31ddc2f935b8ec60f3d5f3825f78ccf244.tar.bz2
GH-103805: Lib test f541 linting issue fix (#103812)
This PR makes some minor linting adjustments to the Lib/test module caught by [ruff](https://github.com/charliermarsh/ruff). The adjustments are all related to the `F541 f-string without any placeholders` issue. Issue: https://github.com/python/cpython/issues/103805 <!-- gh-issue-number: gh-103805 --> * Issue: gh-103805 <!-- /gh-issue-number --> --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Lib/test/test_sqlite3')
-rw-r--r--Lib/test/test_sqlite3/test_regression.py6
-rw-r--r--Lib/test/test_sqlite3/test_userfunctions.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_sqlite3/test_regression.py b/Lib/test/test_sqlite3/test_regression.py
index ad83a97..7e8221e 100644
--- a/Lib/test/test_sqlite3/test_regression.py
+++ b/Lib/test/test_sqlite3/test_regression.py
@@ -491,21 +491,21 @@ class RecursiveUseOfCursors(unittest.TestCase):
def test_recursive_cursor_init(self):
conv = lambda x: self.cur.__init__(self.con)
with patch.dict(sqlite.converters, {"INIT": conv}):
- self.cur.execute(f'select x as "x [INIT]", x from test')
+ self.cur.execute('select x as "x [INIT]", x from test')
self.assertRaisesRegex(sqlite.ProgrammingError, self.msg,
self.cur.fetchall)
def test_recursive_cursor_close(self):
conv = lambda x: self.cur.close()
with patch.dict(sqlite.converters, {"CLOSE": conv}):
- self.cur.execute(f'select x as "x [CLOSE]", x from test')
+ self.cur.execute('select x as "x [CLOSE]", x from test')
self.assertRaisesRegex(sqlite.ProgrammingError, self.msg,
self.cur.fetchall)
def test_recursive_cursor_iter(self):
conv = lambda x, l=[]: self.cur.fetchone() if l else l.append(None)
with patch.dict(sqlite.converters, {"ITER": conv}):
- self.cur.execute(f'select x as "x [ITER]", x from test')
+ self.cur.execute('select x as "x [ITER]", x from test')
self.assertRaisesRegex(sqlite.ProgrammingError, self.msg,
self.cur.fetchall)
diff --git a/Lib/test/test_sqlite3/test_userfunctions.py b/Lib/test/test_sqlite3/test_userfunctions.py
index 0970b03..632d657 100644
--- a/Lib/test/test_sqlite3/test_userfunctions.py
+++ b/Lib/test/test_sqlite3/test_userfunctions.py
@@ -562,7 +562,7 @@ class WindowFunctionTests(unittest.TestCase):
# callback errors to sqlite3_step(); this implies that OperationalError
# is _not_ raised.
with patch.object(WindowSumInt, "finalize", side_effect=BadWindow):
- name = f"exception_in_finalize"
+ name = "exception_in_finalize"
self.con.create_window_function(name, 1, WindowSumInt)
self.cur.execute(self.query % name)
self.cur.fetchall()