Skip to content

[3.13] gh-133439: Fix dot commands with trailing spaces are mistaken for multi-line sqlite statements in the sqlite3 command-line interface (GH-133440) #133765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 3.13
Choose a base branch
from

Conversation

tanloong
Copy link
Contributor

@tanloong tanloong commented May 9, 2025

tanloong added 2 commits May 9, 2025 23:12
…or multi-line sqlite statements in the sqlite3 command-line interface (pythonGH-133440)

(cherry picked from commit ebd4881)
def test_interact_empty_source(self):
out, err = self.run_cli(commands=("", " "))
self.assertIn(self.MEMORY_DB_MSG, err)
self.assertTrue(out.endswith(self.PS1))
Copy link
Member

@picnixz picnixz May 10, 2025

Choose a reason for hiding this comment

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

@serhiy-storchaka Didn't we actually backport the assertStartsWith/assertEndsWith methods to 3.13 as well? we might have more and more issues when doing bug fixes in the future.

Maybe we can mock unittest.TestCase classes but only for the Lib/test directory? (might not be entirely possible if we're reloading modules)

Copy link
Member

Choose a reason for hiding this comment

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

We can use the ExtraAssertions mix-in from test.support.testcase.

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