@@ -124,15 +124,21 @@ def test_interact_empty_source(self):
124124 self .assertEqual (out .count (self .PS2 ), 0 )
125125
126126 def test_interact_dot_commands_unknown (self ):
127- out , err = self .run_cli (commands = (".unknown_command" , "." ))
127+ out , err = self .run_cli (commands = (".unknown_command" ))
128128 self .assertIn (self .MEMORY_DB_MSG , err )
129129 self .assertEndsWith (out , self .PS1 )
130- self .assertEqual (out .count (self .PS1 ), 3 )
130+ self .assertEqual (out .count (self .PS1 ), 2 )
131131 self .assertEqual (out .count (self .PS2 ), 0 )
132+ self .assertIn ("Error" , err )
132133 # test "unknown_command" is pointed out in the error message
133- self .assertIn ("unknown_command" , out )
134- # test ignore empty dot command "." to mimic sqlite3 CLI
135- self .assertEqual (out .count ('Error' ), 1 )
134+ self .assertIn ("unknown_command" , err )
135+
136+ def test_interact_dot_commands_empty (self ):
137+ out , err = self .run_cli (commands = ("." ))
138+ self .assertIn (self .MEMORY_DB_MSG , err )
139+ self .assertEndsWith (out , self .PS1 )
140+ self .assertEqual (out .count (self .PS1 ), 2 )
141+ self .assertEqual (out .count (self .PS2 ), 0 )
136142
137143 def test_interact_dot_commands_with_whitespaces (self ):
138144 out , err = self .run_cli (commands = (".version " , ". version" ))
0 commit comments