@@ -219,9 +219,12 @@ def callback(self, new_breakpoints):
219219 },
220220 ]
221221
222- expected_results = [[breakpoints [0 ]], [breakpoints [0 ], breakpoints [1 ]],
222+ expected_results = [[breakpoints [0 ]],
223+ [breakpoints [0 ], breakpoints [1 ]],
223224 [breakpoints [0 ], breakpoints [1 ], breakpoints [2 ]],
224- [breakpoints [1 ], breakpoints [2 ]]]
225+ [breakpoints [1 ], breakpoints [2 ]],
226+ [breakpoints [1 ], breakpoints [2 ]]
227+ ]
225228 result_checker = ResultChecker (expected_results , self )
226229
227230 self ._client .on_active_breakpoints_changed = result_checker .callback
@@ -231,12 +234,19 @@ def callback(self, new_breakpoints):
231234 self ._client .subscription_complete .wait ()
232235
233236 # Send in updates to trigger the subscription callback.
237+
238+ # Initial state.
234239 self ._fake_subscribe_ref .update ('put' , '/' ,
235240 {breakpoints [0 ]['id' ]: breakpoints [0 ]})
241+ # Add a breakpoint via patch.
236242 self ._fake_subscribe_ref .update ('patch' , '/' ,
237243 {breakpoints [1 ]['id' ]: breakpoints [1 ]})
244+ # Add a breakpoint via put.
238245 self ._fake_subscribe_ref .update ('put' , f'/{ breakpoints [2 ]["id" ]} ' ,
239246 breakpoints [2 ])
247+ # Delete a breakpoint.
248+ self ._fake_subscribe_ref .update ('put' , f'/{ breakpoints [0 ]["id" ]} ' , None )
249+ # Delete the breakpoint a second time; should handle this gracefully.
240250 self ._fake_subscribe_ref .update ('put' , f'/{ breakpoints [0 ]["id" ]} ' , None )
241251
242252 self .assertEqual (len (expected_results ), result_checker ._change_count )
0 commit comments