@@ -80,8 +80,8 @@ def test_cli_on_disk_db(self):
8080@force_not_colorized_test_class
8181class InteractiveSession (unittest .TestCase ):
8282 MEMORY_DB_MSG = "Connected to a transient in-memory database"
83- PS1 = "sqlite> "
84- PS2 = "... "
83+ PS1 = "\001 \002 sqlite> \001 \002 "
84+ PS2 = "\001 \002 ... \001 \002 "
8585
8686 def run_cli (self , * args , commands = ()):
8787 with (
@@ -212,7 +212,7 @@ def test_color(self):
212212@requires_subprocess ()
213213@force_not_colorized_test_class
214214class Completion (unittest .TestCase ):
215- PS1 = "sqlite> "
215+ PS1_NO_COLOR = "sqlite> "
216216
217217 @classmethod
218218 def setUpClass (cls ):
@@ -260,7 +260,7 @@ def test_complete_no_match(self):
260260 lines = output .decode ().splitlines ()
261261 indices = (
262262 i for i , line in enumerate (lines , 1 )
263- if line .startswith (f"{ self .PS1 } xyzzy" )
263+ if line .startswith (f"{ self .PS1_NO_COLOR } xyzzy" )
264264 )
265265 line_num = next (indices , - 1 )
266266 self .assertNotEqual (line_num , - 1 )
@@ -296,7 +296,7 @@ def test_complete_no_input(self):
296296 lines = output .decode ().splitlines ()
297297 indices = [
298298 i for i , line in enumerate (lines )
299- if line .startswith (self .PS1 )
299+ if line .startswith (self .PS1_NO_COLOR )
300300 ]
301301 self .assertEqual (len (indices ), 2 )
302302 start , end = indices
0 commit comments