Skip to content
Merged
Prev Previous commit
Next Next commit
Use abs iso. round
build-in round is missing if SQLITE_OMIT_FLOATING_POINT is defined
  • Loading branch information
Erlend E. Aasland
Erlend E. Aasland committed Nov 5, 2021
commit 032bfd5a9941d1672f830d5c9580bda226ab0895
2 changes: 1 addition & 1 deletion Lib/test/test_sqlite3/test_dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ def test_execute_too_many_params(self):
category = sqlite.SQLITE_LIMIT_VARIABLE_NUMBER
msg = "too many SQL variables"
with cx_limit(self.cx, category=category, limit=1):
Comment thread
erlend-aasland marked this conversation as resolved.
self.cu.execute("select round(?)", (1.1,))
self.cu.execute("select abs(?)", (-1,))
with self.assertRaisesRegex(sqlite.OperationalError, msg):
self.cu.execute("select max(?, ?)", (1, 2))
Comment thread
erlend-aasland marked this conversation as resolved.
Outdated

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_sqlite3/test_userfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def test_func_too_many_args(self):
category = sqlite.SQLITE_LIMIT_FUNCTION_ARG
msg = "too many arguments on function"
with cx_limit(self.con, category=category, limit=1):
self.con.execute("select round(1.1)");
self.con.execute("select abs(-1)");
with self.assertRaisesRegex(sqlite.OperationalError, msg):
self.con.execute("select max(1, 2)");

Expand Down