Skip to content

Commit 22d2b27

Browse files
committed
Revert changes unrelated to the original PR
1 parent 2f74e65 commit 22d2b27

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Lib/test/test_sqlite3/test_cli.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,22 @@ def test_interact(self):
8989
out, err = self.run_cli()
9090
self.assertIn(self.MEMORY_DB_MSG, err)
9191
self.assertIn(self.MEMORY_DB_MSG, err)
92-
self.assertEndsWith(out, self.PS1)
92+
self.assertTrue(out.endswith(self.PS1))
9393
self.assertEqual(out.count(self.PS1), 1)
9494
self.assertEqual(out.count(self.PS2), 0)
9595

9696
def test_interact_quit(self):
9797
out, err = self.run_cli(commands=(".quit",))
9898
self.assertIn(self.MEMORY_DB_MSG, err)
99-
self.assertEndsWith(out, self.PS1)
99+
self.assertTrue(out.endswith(self.PS1))
100100
self.assertEqual(out.count(self.PS1), 1)
101101
self.assertEqual(out.count(self.PS2), 0)
102102

103103
def test_interact_version(self):
104104
out, err = self.run_cli(commands=(".version",))
105105
self.assertIn(self.MEMORY_DB_MSG, err)
106106
self.assertIn(sqlite3.sqlite_version + "\n", out)
107-
self.assertEndsWith(out, self.PS1)
107+
self.assertTrue(out.endswith(self.PS1))
108108
self.assertEqual(out.count(self.PS1), 2)
109109
self.assertEqual(out.count(self.PS2), 0)
110110
self.assertIn(sqlite3.sqlite_version, out)
@@ -145,14 +145,14 @@ def test_interact_valid_sql(self):
145145
out, err = self.run_cli(commands=("SELECT 1;",))
146146
self.assertIn(self.MEMORY_DB_MSG, err)
147147
self.assertIn("(1,)\n", out)
148-
self.assertEndsWith(out, self.PS1)
148+
self.assertTrue(out.endswith(self.PS1))
149149
self.assertEqual(out.count(self.PS1), 2)
150150
self.assertEqual(out.count(self.PS2), 0)
151151

152152
def test_interact_incomplete_multiline_sql(self):
153153
out, err = self.run_cli(commands=("SELECT 1",))
154154
self.assertIn(self.MEMORY_DB_MSG, err)
155-
self.assertEndsWith(out, self.PS2)
155+
self.assertTrue(out.endswith(self.PS2))
156156
self.assertEqual(out.count(self.PS1), 1)
157157
self.assertEqual(out.count(self.PS2), 1)
158158

@@ -161,15 +161,15 @@ def test_interact_valid_multiline_sql(self):
161161
self.assertIn(self.MEMORY_DB_MSG, err)
162162
self.assertIn(self.PS2, out)
163163
self.assertIn("(1,)\n", out)
164-
self.assertEndsWith(out, self.PS1)
164+
self.assertTrue(out.endswith(self.PS1))
165165
self.assertEqual(out.count(self.PS1), 2)
166166
self.assertEqual(out.count(self.PS2), 1)
167167

168168
def test_interact_invalid_sql(self):
169169
out, err = self.run_cli(commands=("sel;",))
170170
self.assertIn(self.MEMORY_DB_MSG, err)
171171
self.assertIn("OperationalError (SQLITE_ERROR)", err)
172-
self.assertEndsWith(out, self.PS1)
172+
self.assertTrue(out.endswith(self.PS1))
173173
self.assertEqual(out.count(self.PS1), 2)
174174
self.assertEqual(out.count(self.PS2), 0)
175175

@@ -178,7 +178,7 @@ def test_interact_on_disk_file(self):
178178

179179
out, err = self.run_cli(TESTFN, commands=("CREATE TABLE t(t);",))
180180
self.assertIn(TESTFN, err)
181-
self.assertEndsWith(out, self.PS1)
181+
self.assertTrue(out.endswith(self.PS1))
182182

183183
out, _ = self.run_cli(TESTFN, commands=("SELECT count(t) FROM t;",))
184184
self.assertIn("(0,)\n", out)

0 commit comments

Comments
 (0)