8000 bpo-45243: Add support for setting/getting `sqlite3` connection limits by erlend-aasland · Pull Request #28463 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-45243: Add support for setting/getting sqlite3 connection limits #28463

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Nov 1, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Expand test suite
  • Loading branch information
Erlend E. Aasland committed Oct 21, 2021
commit eb6c23396d051ab27e8443fc7752c0e1096dce71
12 changes: 7 additions & 5 deletions Lib/sqlite3/test/test_dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,13 @@ def test_connection_limits(self):
finally: # restore saved limit
self.cx.setlimit(category, saved_limit)

def test_connection_set_bad_limit(self):
self.assertRaisesRegex(
sqlite.ProgrammingError, "'category' is out of bounds",
self.cx.setlimit, 1111, 0
)
def test_connection_bad_limit_category(self):
msg = "'category' is out of bounds"
cat = 1111
self.assertRaisesRegex(sqlite.ProgrammingError, msg,
self.cx.getlimit, cat)
self.assertRaisesRegex(sqlite.ProgrammingError, msg,
self.cx.setlimit, cat, 0)


class UninitialisedConnectionTests(unittest.TestCase):
Expand Down
0