-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Make 3.10 sqlite3 tests run #94998
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
Comments
I copied 3.11 With the function commented out, python crashes with (Reminder to self: changes on branch sql310.) |
Add __init__ and __main__ to test_sqlite3 directory. In test_dbapi, comment out cx_limit, line 42. Add 'verbosity=2' to unittest.main().
There is no
It was added by Brett's request. I'd like to keep it there, as it explains the otherwise apparently unused import.
Tests can be run directly ( |
FTR, sqlite3 tests run as they should in 3.10: $ ./python.exe -m test test_sqlite -v | wc -l
369 |
…lite3 directory The directory was incorrectly partially backported in commit 2229d34 (See pythongh-93801)
Sorry, this may not be obvious, but the sqlite3 tests were moved in 3.11. For 3.10 and older, they all lived in Perhaps we should add an entry to the 3.11 What's New. |
Fixed with gh-95016; thanks for the report! |
I wondered whether deleting test_sqlite3/ might be a reasonable alternative. But was not aware that it was a partial duplicate. The purpose of conditionalizing unittest.main() in x.py is to not call it when x is imported. But main.py is normally only run with I think all the test directory movements should be mentioned in the corresponding What's New. |
Yeah, I think you're right about the |
pythonGH-95052) (cherry picked from commit 9d09e7b) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
…95052) (cherry picked from commit 9d09e7b) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
On my Windows 10, after fresh repository update and debug build, 3.10 sqlite3 tests do not run.
(3.11 and 3.12 are fine.) In 3.10,
test_sqlite/
only containstest_dbapi.py
python -m test test_sqlite3
is OK after no tests run. (I though we made this an error.)python -m test.test_sqlite3
fails because test_sqlite3/ is missing__main__.py
, as well as__init__.py
In 3.11,
test_sqlite3.__main__.py
isThe comment seems not needed. The other 3.10 test.test_x directories all run and have variations of this. Some have
from . import load_tests
. Some haveunittest.main('test.test_x')
instead of a load_tests import. Most omit the redundant if-clause.After adding
__main__.py
, tests still do not run because__init__.py
is needed. I may try to do a PR tomorrow.The text was updated successfully, but these errors were encountered: