[New-bugs-announce] [issue34860] fix test_sqlite for AIX
Michael Felt
report at bugs.python.org
Mon Oct 1 04:36:44 EDT 2018
New submission from Michael Felt <aixtools at felt.demon.nl>:
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.
----------
messages: 326769
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: fix test_sqlite for AIX
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34860>
_______________________________________
More information about the New-bugs-announce
mailing list