Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

test_sqlite3.test_dbapi: Extended error codes aren't actually tested #93115

Copy link
Copy link
@The-Compiler

Description

@The-Compiler
Issue body actions

Bug report

In 456e27a / GH-28076, @erlend-aasland added extended error codes to test_module_constants - however, they use sqlite.version_info, documented as (emphasis mine):

The version number of this module, as a tuple of integers. This is not the version of the SQLite library.

Which has been set to "2.6.0" for the past 12 years or so:

#define PYSQLITE_VERSION "2.6.0"

Causing that code to never be run at all. sqlite.sqlite_version_info should probably be used instead.

Additionally, the last statement does:

const.append("SQLITE_IOERR_CORRUPTFS")

instead of consts.append, which would cause a NameError if the conditions above were correct.

Preparing a PR to fix this.

(Found by running flake8 over Lib/ out of curiosity, see #93010 (comment))

Your environment

  • CPython versions tested on: The affected code was added in v3.11.0a2.
  • Operating system and architecture: Archlinux x86_64
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirTests in the Lib/test dirtopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    Status
    Done
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.