Skip to content

Commit 62d4719

Browse files
committed
Fix tests
1 parent 771f617 commit 62d4719

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_sqlite3/test_cli.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ def test_interact_version(self):
111111
def test_interact_empty_source(self):
112112
out, err = self.run_cli(commands=("", " "))
113113
self.assertIn(self.MEMORY_DB_MSG, err)
114-
self.assertEndsWith(out, self.PS1)
114+
self.assertTrue(out.endswith(self.PS1))
115115
self.assertEqual(out.count(self.PS1), 3)
116116
self.assertEqual(out.count(self.PS2), 0)
117117

118118
def test_interact_dot_commands_unknown(self):
119119
out, err = self.run_cli(commands=(".unknown_command", ))
120120
self.assertIn(self.MEMORY_DB_MSG, err)
121-
self.assertEndsWith(out, self.PS1)
121+
self.assertTrue(out.endswith(self.PS1))
122122
self.assertEqual(out.count(self.PS1), 2)
123123
self.assertEqual(out.count(self.PS2), 0)
124124
self.assertIn("Error", err)
@@ -128,15 +128,15 @@ def test_interact_dot_commands_unknown(self):
128128
def test_interact_dot_commands_empty(self):
129129
out, err = self.run_cli(commands=("."))
130130
self.assertIn(self.MEMORY_DB_MSG, err)
131-
self.assertEndsWith(out, self.PS1)
131+
self.assertTrue(out.endswith(self.PS1))
132132
self.assertEqual(out.count(self.PS1), 2)
133133
self.assertEqual(out.count(self.PS2), 0)
134134

135135
def test_interact_dot_commands_with_whitespaces(self):
136136
out, err = self.run_cli(commands=(".version ", ". version"))
137137
self.assertIn(self.MEMORY_DB_MSG, err)
138138
self.assertEqual(out.count(sqlite3.sqlite_version + "\n"), 2)
139-
self.assertEndsWith(out, self.PS1)
139+
self.assertTrue(out.endswith(self.PS1))
140140
self.assertEqual(out.count(self.PS1), 3)
141141
self.assertEqual(out.count(self.PS2), 0)
142142

0 commit comments

Comments
 (0)