← 返回首页
Improve `test_sqlite3.test_sqlite_row_iter` · Issue #100553 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

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

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Improve test_sqlite3.test_sqlite_row_iter #100553

New issue
New issue

Description

While working on #100457 I've noticed that test_sqlite_row_iter can be improved. Right now it is defined as:

def test_sqlite_row_iter(self): """Checks if the row object is iterable""" self.con.row_factory = sqlite.Row row = self.con.execute("select 1 as a, 2 as b").fetchone() for col in row: pass

Well, there are several issues:

  1. We do not check what values it actually returns
  2. We do not check whether or not it is iterable the second time, because some types are implemented as generators and cannot be iterated over the second time

I will send a PR with the improved test.

Linked PRs

Metadata

Metadata

Assignees

Labels

testsTests in the Lib/test dirtopic-sqlite3type-bugAn unexpected behavior, bug, or error

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

  • Open in GitHub Copilot app

Footer

© 2026 GitHub, Inc.