This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michael.Felt
Recipients Michael.Felt
Date 2018-10-01.08:36:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538383004.27.0.545547206417.issue34860@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-10-01 08:36:44Michael.Feltsetrecipients: + Michael.Felt
2018-10-01 08:36:44Michael.Feltsetmessageid: <1538383004.27.0.545547206417.issue34860@psf.upfronthosting.co.za>
2018-10-01 08:36:44Michael.Feltlinkissue34860 messages
2018-10-01 08:36:43Michael.Feltcreate