Title: Unused variable in Lib/sqlite3/test/
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.3, Python 3.4, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, ezio.melotti, python-dev, vajrasky
Priority: normal Keywords: patch

Created on 2013-12-27 10:56 by vajrasky, last changed 2014-02-15 18:20 by python-dev. This issue is now closed.

File name Uploaded Description Edit
unused_variable_in_factory_py.patch vajrasky, 2013-12-27 10:56 review
unused_variable_in_factory_py_v2.patch vajrasky, 2014-01-02 05:20 review
Messages (4)
msg206990 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2013-12-27 10:56
There is unused variable t in Lib/sqlite3/test/

    def CheckSqliteRowAsTuple(self):
        """Checks if the row object can be converted to a tuple"""
        self.con.row_factory = sqlite.Row
        row = self.con.execute("select 1 as a, 2 as b").fetchone()
        t = tuple(row)

    def CheckSqliteRowAsDict(self):

Attached the patch to give the purpose to variable t.
msg206997 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2013-12-27 15:56
I think you want to either also testing the number of elements in t, or in just compare t to (row["a"], row["b"]) (untested).
msg207146 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2014-01-02 05:20
Thanks, Eric! Attached the patch to address Eric's concern.
msg211287 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-02-15 18:20
New changeset a87f284e14ea by Benjamin Peterson in branch '2.7':
add missing test assertion (closes #20080)

New changeset 66c7791d9841 by Benjamin Peterson in branch '3.3':
add missing test assertion (closes #20080)

New changeset 93d7f8223370 by Benjamin Peterson in branch 'default':
merge 3.3 (#20080)
Date User Action Args
2014-02-15 18:20:47python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg211287

resolution: fixed
stage: patch review -> resolved
2014-02-15 15:14:15ezio.melottisetnosy: + ezio.melotti

stage: patch review
2014-01-02 05:20:42vajraskysetfiles: + unused_variable_in_factory_py_v2.patch

messages: + msg207146
2013-12-27 15:56:31eric.smithsetnosy: + eric.smith
messages: + msg206997
2013-12-27 10:56:02vajraskycreate