Title: Improve `test_sqlite3.test_sqlite_row_iter` · Issue #100553 · python/cpython · GitHub
Open Graph Title: Improve `test_sqlite3.test_sqlite_row_iter` · Issue #100553 · python/cpython
X Title: Improve `test_sqlite3.test_sqlite_row_iter` · Issue #100553 · python/cpython
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.exec...
Open Graph 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_...
X 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 iterab...
Opengraph URL: https://github.com/python/cpython/issues/100553
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve `test_sqlite3.test_sqlite_row_iter`","articleBody":"While working on #100457 I've noticed that `test_sqlite_row_iter` can be improved. Right now it is defined as:\r\n\r\n```python\r\n def test_sqlite_row_iter(self):\r\n \"\"\"Checks if the row object is iterable\"\"\"\r\n self.con.row_factory = sqlite.Row\r\n row = self.con.execute(\"select 1 as a, 2 as b\").fetchone()\r\n for col in row:\r\n pass\r\n```\r\n\r\nWell, there are several issues:\r\n1. We do not check what values it actually returns\r\n2. 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\r\n\r\nI will send a PR with the improved test.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-100555\n* gh-100564\n* gh-100565\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/sobolevn","@type":"Person","name":"sobolevn"},"datePublished":"2022-12-27T11:44:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/100553/cpython/issues/100553"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e95d929a-a29a-2e48-d169-9ffb8ca6c591 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B41C:27A700:9A41BD:DBBD50:69690209 |
| html-safe-nonce | 9dea23d565de6db2cddc7a00dc2ad7ded13ed098ad51480a957933d06fadab47 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDFDOjI3QTcwMDo5QTQxQkQ6REJCRDUwOjY5NjkwMjA5IiwidmlzaXRvcl9pZCI6IjYzMDE0MTQ2MzA3Njg1NzQ5ODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 50954d4ee89e4676ba178b9990483479e0090fb8e89c775b003dc04e2c99d464 |
| hovercard-subject-tag | issue:1511724436 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/100553/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d2cfb7343a7d4d326383dad18ecfb253ffe9b1dab9f61ed3fe48da8548e41dee/python/cpython/issues/100553 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d2cfb7343a7d4d326383dad18ecfb253ffe9b1dab9f61ed3fe48da8548e41dee/python/cpython/issues/100553 |
| og:image:alt | 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_... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sobolevn |
| hostname | github.com |
| expected-hostname | github.com |
| None | e6156bd4ef9f2dc8dadf4c49a8f7ed8532186388cef72eda3ccb9f0ab3b8cfca |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fd1938215b152e2c6a29cf56fec07fd9f91f1203 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width