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

bpo-26187: Tests for sqlite3 trace callback#434

Closed
AnishShah wants to merge 1 commit into
python:masterpython/cpython:masterfrom
AnishShah:bpo-26187Copy head branch name to clipboard
Closed

bpo-26187: Tests for sqlite3 trace callback#434
AnishShah wants to merge 1 commit into
python:masterpython/cpython:masterfrom
AnishShah:bpo-26187Copy head branch name to clipboard

Conversation

@AnishShah

Copy link
Copy Markdown
Contributor

No description provided.

@mention-bot

Copy link
Copy Markdown

@AnishShah, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Yhg1s, @ghaering, @berkerpeksag, @mdickinson and @serhiy-storchaka to be potential reviewers.

Comment thread Lib/sqlite3/test/hooks.py
"Unicode data %s garbled in trace callback: %s"
% (ascii(unicode_value), ', '.join(map(ascii, traced_statements))))

def CheckTraceCallbackContent(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should skip the test if sqlite3_prepare_v2 is not available.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test name doesn't explain what we actually testing here.

Comment thread Lib/sqlite3/test/hooks.py

def CheckTraceCallbackContent(self):
"""
Test that the statement are correct. Fix for bpo-26187

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring is not needed.

Comment thread Lib/sqlite3/test/hooks.py
con.execute(query)
con.commit()
queries.insert(1, "BEGIN ")
queries.append("COMMIT")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines can be removed. We only want to test that set_trace_callback doesn't produce any duplicate entries.

@palaviv

palaviv commented Mar 4, 2017

Copy link
Copy Markdown
Contributor

This test don't fail before the fix in #359. I opened another PR (#461) with fixed test.

@AnishShah AnishShah closed this Mar 5, 2017
@AnishShah AnishShah deleted the bpo-26187 branch March 5, 2017 08:56
@berkerpeksag

Copy link
Copy Markdown
Member

Thanks, Aviv. Next time please send your feedback as a comment and give the PR author some time to address your comments. Otherwise, we will end up with duplicate PRs.

Also note that we always locally run tests and make sure that the test fails before the fix is applied so the chance of merging a broken test is minimal.

@palaviv

palaviv commented Mar 10, 2017

Copy link
Copy Markdown
Contributor

Sorry about that @berkerpeksag. I actually started by writing a comment on this PR but found out that what I do is to write the all test again. I am still having hard time understanding what @AnishShah did here as I wrote a test case in the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

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