aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/sqlite3/test/dbapi.py
Commit message (Collapse)AuthorAge
* bpo-45181: Simplify loading sqlite3 tests (GH-28304)Serhiy Storchaka2021-09-13
| | | | | Use unittest discover instead of manually enumerating all test modules and classes. Also add support for filtering them by pattern.
* bpo-45041: Increase coverage for sqlite3.Cursor.executescript() (GH-28074)Erlend Egeberg Aasland2021-08-30
|
* bpo-16379: expose SQLite error codes and error names in `sqlite3` (GH-27786)Erlend Egeberg Aasland2021-08-30
|
* bpo-25130: Make SQLite tests more compatible with PyPy (GH-28021)Serhiy Storchaka2021-08-29
|
* bpo-27334: roll back transaction if sqlite3 context manager fails to commit ↵Erlend Egeberg Aasland2021-08-25
| | | | | | (GH-26202) Co-authored-by: Luca Citi Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
* bpo-44859: Improve error handling in sqlite3 and and raise more accurate ↵Serhiy Storchaka2021-08-08
| | | | | | | | | | | | | | | | | | | | exceptions. (GH-27654) * MemoryError is now raised instead of sqlite3.Warning when memory is not enough for encoding a statement to UTF-8 in Connection.__call__() and Cursor.execute(). * UnicodEncodeError is now raised instead of sqlite3.Warning when the statement contains surrogate characters in Connection.__call__() and Cursor.execute(). * TypeError is now raised instead of ValueError for non-string script argument in Cursor.executescript(). * ValueError is now raised for script containing the null character instead of truncating it in Cursor.executescript(). * Correctly handle exceptions raised when getting boolean value of the result of the progress handler. * Add many tests covering different corner cases. Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-31746: Prevent segfaults when sqlite3.Connection is uninitialised (GH-27431)Erlend Egeberg Aasland2021-07-29
|
* bpo-44491: Allow clearing the sqlite3 authoriser callback (GH-26863)Erlend Egeberg Aasland2021-06-24
|
* bpo-43553: Improve `sqlite3` test coverage (GH-26886)Erlend Egeberg Aasland2021-06-24
|
* bpo-42064: Move `sqlite3` exceptions to global state, part 1 of 2 (GH-26745)Erlend Egeberg Aasland2021-06-23
| | | Also adds a test to verify the (borrowed) exceptions in `sqlite3.Connection`.
* bpo-44430: Refactor `sqlite3` threading tests (GH-26748)Erlend Egeberg Aasland2021-06-20
| | | | | | | 1. Rewrite ThreadTests with a _run_test() helper method that does the heavy lifting 2. Add test.support.threading_helper.reap_threads to _run_test() 3. Use _run_test() in all threading tests 4. Add test case for sqlite3.Connection.set_trace_callback 5. Add test case for sqlite3.Connection.create_collation
* bpo-44087: Disallow instantiation of sqlite3.Statement (GH-26567)Erlend Egeberg Aasland2021-06-20
|
* bpo-40956: Convert sqlite3.connect and sqlite3.Connection.__init__ to AC ↵Erlend Egeberg Aasland2021-06-20
| | | | (GH-24421)
* bpo-44041: Add test for sqlite3 column count (GH-25907)Erlend Egeberg Aasland2021-06-04
|
* bpo-42213: Remove redundant cyclic GC hack in sqlite3 (GH-26517)Erlend Egeberg Aasland2021-06-03
| | | | | | | | | | The sqlite3 module now fully implements the GC protocol, so there's no need for this workaround anymore. - Add and use managed resource helper for connections using TESTFN - Sort test imports - Split open-tests into their own test case Automerge-Triggered-By: GH:vstinner
* bpo-42213: Check connection in sqlite3.Connection.__enter__ (GH-26512)Erlend Egeberg Aasland2021-06-03
| | | | | | | | | Try to harden connection close: - add tests that exercise stuff against a closed database - add wrapper for sqlite3_close_v2() - check connection on __enter__ - explicitly free pending statements before close() - sqlite3_close_v2() always returns SQLITE_OK
* bpo-24464: Fix sqlite3.enable_shared_cache() deprecation wrapper (GH-24170)Erlend Egeberg Aasland2021-01-09
|
* bpo-42847: Normalise Lib/sqlite3/test/* file encodings (GH-24147)Erlend Egeberg Aasland2021-01-07
| | | Convert from ISO-8859-1 to UTF-8.
* bpo-40823: Use loadTestsFromTestCase() iso. makeSuite() in sqlite3 tests ↵Erlend Egeberg Aasland2021-01-07
| | | | (GH-20538)
* bpo-24464: Deprecate sqlite3.enable_shared_cache (GH-24008)Erlend Egeberg Aasland2021-01-06
|
* bpo-40810: Require SQLite 3.7.15 (GH-24106)Erlend Egeberg Aasland2021-01-06
|
* bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)Serhiy Storchaka2020-09-17
| | | | | | | * When the parameters argument is a list, correctly handle the case of changing it during iteration. * When the parameters argument is a custom sequence, no longer override an exception raised in ``__len__()``.
* bpo-40744: Drop support for SQLite pre 3.7.3 (GH-20909)Erlend Egeberg Aasland2020-09-07
| | | | | | Remove code required to support SQLite pre 3.7.3. Co-written-by: Berker Peksag <berker.peksag@gmail.com> Co-written-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
* bpo-40275: Use new test.support helper submodules in tests (GH-21772)Hai Shi2020-08-07
|
* bpo-37406: sqlite3 raises TypeError for wrong operation type (GH-14386)Victor Stinner2019-06-26
| | | | | The sqlite3 module now raises TypeError, rather than ValueError, if operation argument type is not str: execute(), executemany() and calling a connection.
* Spelling fixes to docs, docstrings, and comments (GH-6374)Ville Skyttä2018-04-20
|
* bpo-31843: sqlite3.connect() now accepts PathLike objects as database name ↵Anders Lorentsen2017-11-06
| | | | (#4299)
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-07
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* Issue #21250: Merge from 3.5Berker Peksag2016-09-07
|\
| * Issue #21250: Add tests for SQLite's ON CONFLICT clauseBerker Peksag2016-09-07
| | | | | | | | Initial patch by Alex LordThorsen.
* | Issue #16864: Cursor.lastrowid now supports REPLACE statementBerker Peksag2016-06-14
|/ | | | Initial patch by Alex LordThorsen.
* Mark tests as skipped when a SQLite version is not supportedBerker Peksag2016-06-14
|
* Remove empty setUp and tearDown methods from sqlite3 testsBerker Peksag2016-06-14
| | | | | They are not used as base classes by another tests so they can safely be removed.
* Replace more boilerplate code with modern unittest features in sqlite3 testsBerker Peksag2016-06-14
|
* Modernize sqlite3 testsBerker Peksag2016-06-12
| | | | | Update current tests that use old pattern with assertRaises to make them more maintainable.
* Issue #27190: Raise NotSupportedError if sqlite3 is older than 3.3.1Berker Peksag2016-06-12
| | | | Patch by Dave Sawyer.
* Issue #27188: Fix various sqlite3 documentation errorsBerker Peksag2016-06-12
| | | | | | | | | | | * Connection.execute* methods don't create intermediate cursor objects * Fix description of seq_of_parameters parameter * Clarify that Warning is sqlite3.Warning * sql_script parameter of Cursor.executescript() doesn't accept bytes * Add missing tests * Fix various markup errors Initial patch by Dave Sawyer.
* Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)Brett Cannon2013-07-04
|
* Issue #18200: Update the stdlib (except tests) to useBrett Cannon2013-06-13
| | | | ModuleNotFoundError.
* Issue #13773: sqlite3.connect() gets a new `uri` parameter to pass the ↵Antoine Pitrou2013-02-10
| | | | filename as a URI, allowing to pass custom options.
* Make sqlite3 tests editable with EmacsPetri Lehtinen2012-02-02
| | | | | Change the coding declaration from ISO-8859-1 to iso-8859-1. Emacs doesn't understand the former.
* sqlite3: Handle strings with embedded zeros correctlyPetri Lehtinen2012-02-01
| | | | Closes #13676.
* #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-20
|
* #8845: expose sqlite3 inTransaction as RO in_transaction Connection attribute.R. David Murray2010-06-01
| | | | Patch by R. David Murray, unit tests by Shashwat Anand.
* Merged revisions 80552-80556,80564-80566,80568-80571 via svnmerge fromVictor Stinner2010-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80552 | victor.stinner | 2010-04-27 23:46:03 +0200 (mar., 27 avril 2010) | 3 lines Issue #7449, part 1: fix test_support.py for Python compiled without thread ........ r80553 | victor.stinner | 2010-04-27 23:47:01 +0200 (mar., 27 avril 2010) | 1 line Issue #7449, part 2: regrtest.py -j option requires thread support ........ r80554 | victor.stinner | 2010-04-27 23:51:26 +0200 (mar., 27 avril 2010) | 9 lines Issue #7449 part 3, test_doctest: import trace module in test_coverage() Import trace module fail if the threading module is missing. test_coverage() is only used if test_doctest.py is used with the -c option. This commit allows to execute the test suite without thread support. Move "import trace" in test_coverage() and use test_support.import_module('trace'). ........ r80555 | victor.stinner | 2010-04-27 23:56:26 +0200 (mar., 27 avril 2010) | 6 lines Issue #7449, part 4: skip test_multiprocessing if thread support is disabled import threading after _multiprocessing to raise a more revelant error message: "No module named _multiprocessing". _multiprocessing is not compiled without thread support. ........ r80556 | victor.stinner | 2010-04-28 00:01:24 +0200 (mer., 28 avril 2010) | 8 lines Issue #7449, part 5: split Test.test_open() of ctypes/test/test_errno.py * Split Test.test_open() in 2 functions: test_open() and test_thread_open() * Skip test_open() and test_thread_open() if we are unable to find the C library * Skip test_thread_open() if thread support is disabled * Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError() ........ r80564 | victor.stinner | 2010-04-28 00:59:35 +0200 (mer., 28 avril 2010) | 4 lines Issue #7449, part 6: fix test_hashlib for missing threading module Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing(). ........ r80565 | victor.stinner | 2010-04-28 01:01:29 +0200 (mer., 28 avril 2010) | 6 lines Issue #7449, part 7: simplify threading detection in test_capi * Skip TestPendingCalls if threading module is missing * Test if threading module is present or not, instead of test the presence of _testcapi._test_thread_state ........ r80566 | victor.stinner | 2010-04-28 01:03:16 +0200 (mer., 28 avril 2010) | 4 lines Issue #7449, part 8: don't skip the whole test_asynchat if threading is missing TestFifo can be executed without the threading module ........ r80568 | victor.stinner | 2010-04-28 01:14:58 +0200 (mer., 28 avril 2010) | 6 lines Issue #7449, part 9: fix test_xmlrpclib for missing threading module * Skip testcases using threads if threading module is missing * Use "http://" instead of URL in ServerProxyTestCase if threading is missing because URL is not set in this case ........ r80569 | victor.stinner | 2010-04-28 01:33:58 +0200 (mer., 28 avril 2010) | 6 lines Partial revert of r80556 (Issue #7449, part 5, fix ctypes test) Rewrite r80556: the thread test have to be executed just after the test on libc_open() and so the test cannot be splitted in two functions (without duplicating code, and I don't want to duplicate code). ........ r80570 | victor.stinner | 2010-04-28 01:51:16 +0200 (mer., 28 avril 2010) | 8 lines Issue #7449, part 10: test_cmd imports trace module using test_support.import_module() Use test_support.import_module() instead of import to raise a SkipTest exception if the import fail. Import trace fails if the threading module is missing. See also part 3: test_doctest: import trace module in test_coverage(). ........ r80571 | victor.stinner | 2010-04-28 01:55:59 +0200 (mer., 28 avril 2010) | 6 lines Issue #7449, last part (11): fix many tests if thread support is disabled * Use try/except ImportError or test_support.import_module() to import thread and threading modules * Add @unittest.skipUnless(threading, ...) to testcases using threads ........
* Merged new pysqlite version 2.6.0 from trunk.Gerhard Häring2010-03-05
|
* change deprecated unittest method calls into their proper names.Gregory P. Smith2009-07-04
|
* Merged revisions ↵Georg Brandl2008-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63562,63570,63728,63734,63784,63788,63802,63817,63827,63839,63887,63975,63998 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63562 | martin.v.loewis | 2008-05-23 17:06:50 +0200 (Fri, 23 May 2008) | 2 lines Patch #1722225: Support QNX 6. ........ r63570 | trent.nelson | 2008-05-23 22:33:14 +0200 (Fri, 23 May 2008) | 1 line Introduce a user macro named $(externalsDir), which should point to the root directory of where all the external sources should live. Developers can change this value if their external sources live elsewhere. The default of '..\..' matches the current status quo. ........ r63728 | gregory.p.smith | 2008-05-26 23:16:34 +0200 (Mon, 26 May 2008) | 4 lines Fix issue2589: there was a potential integer overflow leading to memory corruption on esoteric platforms and incorrect behavior on normal platforms. ........ r63734 | gregory.p.smith | 2008-05-27 00:07:28 +0200 (Tue, 27 May 2008) | 3 lines Fix issue2588: Do not execute str[size-1] = '\0' when a 0 size is passed in. (The assert won't prevent this in non-debug builds). ........ r63784 | raymond.hettinger | 2008-05-29 10:38:23 +0200 (Thu, 29 May 2008) | 1 line Fix two typos. ........ r63788 | facundo.batista | 2008-05-29 18:39:26 +0200 (Thu, 29 May 2008) | 6 lines Fixed the semantic of timeout for socket.create_connection and all the upper level libraries that use it, including urllib2. Added and fixed some tests, and changed docs correspondingly. Thanks to John J Lee for the patch and the pusing, :) ........ r63802 | mark.dickinson | 2008-05-30 04:46:53 +0200 (Fri, 30 May 2008) | 2 lines Fix typo in testSum ........ r63817 | raymond.hettinger | 2008-05-30 20:20:50 +0200 (Fri, 30 May 2008) | 8 lines * Mark intermedidate computes values (hi, lo, yr) as volatile. * Expand comments. * Swap variable names in the sum_exact code so that x and y are consistently chosen as the larger and smaller magnitude values respectively. ........ r63827 | raymond.hettinger | 2008-05-31 05:24:31 +0200 (Sat, 31 May 2008) | 1 line Implement heapq in terms of less-than (to match list.sort()). ........ r63839 | gerhard.haering | 2008-05-31 23:33:27 +0200 (Sat, 31 May 2008) | 2 lines Fixed rowcount for SELECT statements. They're -1 now (again), for better DB-API 2.0 compliance. ........ r63887 | gregory.p.smith | 2008-06-02 06:05:52 +0200 (Mon, 02 Jun 2008) | 4 lines Fix issue 2782: be less strict about the format string type in strftime. Accept unicode and anything else ParseTuple "s#" can deal with. This matches the time.strftime behavior. ........ r63975 | neal.norwitz | 2008-06-06 06:47:01 +0200 (Fri, 06 Jun 2008) | 3 lines Aldo Cortesi confirmed this is still needed for OpenBSD 4.2 and 4.3. (I didn't regen configure, since I don't have a working autoconf.) ........ r63998 | raymond.hettinger | 2008-06-06 23:47:51 +0200 (Fri, 06 Jun 2008) | 1 line Issue 3501: Make heapq support both __le__ and __lt__. ........
* Bring sqlite3 module up-to-date with what's now in 2.6. Almost. I intentionallyGerhard Häring2008-03-29
| | | | left out the stuff about creating a connection object from a APSW connection.
* Breaking ground for PEP 3137 implementation:Guido van Rossum2007-10-08
| | | | | | Get rid of buffer(). Use memoryview() in its place where possible. In a few places, do things a bit different, because memoryview() can't slice (yet).