Message326769
On AIX test_sqlite fails with:
======================================================================
FAIL: test_database_source_name (sqlite3.test.backup.BackupTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/aixtools/python/git/aix-pr/Lib/sqlite3/test/backup.py", line 146, in test_database_source_name
['SQL logic error', 'SQL logic error or missing database']
AssertionError: 'unrecognized error code: 1' not found in ['SQL logic error', 'SQL logic error or missing database']
Likely this is because the sqlite3 that is installed either has a bug, is too old, or was overly optimized and the expected error message is not being returned.
A simple addition as:
def test_database_source_name(self):
with sqlite.connect(':memory:') as bck:
self.cx.backup(bck, name='main')
with sqlite.connect(':memory:') as bck:
self.cx.backup(bck, name='temp')
with self.assertRaises(sqlite.OperationalError) as cm:
with sqlite.connect(':memory:') as bck:
self.cx.backup(bck, name='non-existing')
self.assertIn(
str(cm.exception),
['SQL logic error', 'SQL logic error or missing database', 'unrecognized error code: 1']
)
allows to test to pass.
Again, this is not a problem with either python or AIX - only yhe implementation of sqlite3 installed.
My hope is that the PR with the modification above (add 'unrecognized error code: 1') will be accepted.
Thx for your consideration. |
|
Date |
User |
Action |
Args |
2018-10-01 08:36:44 | Michael.Felt | set | recipients:
+ Michael.Felt |
2018-10-01 08:36:44 | Michael.Felt | set | messageid: <1538383004.27.0.545547206417.issue34860@psf.upfronthosting.co.za> |
2018-10-01 08:36:44 | Michael.Felt | link | issue34860 messages |
2018-10-01 08:36:43 | Michael.Felt | create | |
|