File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,11 @@ def missing_branch_arcs(self) -> dict[TLineNo, list[TLineNo]]:
202202 branch_lines = set (self ._branch_lines ())
203203 mba = collections .defaultdict (list )
204204 for l1 , l2 in missing :
205- assert l1 != l2 , f"missing_branch_arcs({ self .filename !r} ): ({ l1 } , { l2 } )"
205+ if l1 == l2 :
206+ import contextlib , sys
207+ with open (f"/tmp/l1l2-{ sys .version_info [1 ]} .out" , "a" ) as f :
208+ with contextlib .redirect_stdout (f ):
209+ print (f"missing_branch_arcs({ self .filename !r} ): ({ l1 } , { l2 } )" )
206210 if l1 in branch_lines :
207211 mba [l1 ].append (l2 )
208212 return mba
@@ -218,7 +222,12 @@ def executed_branch_arcs(self) -> dict[TLineNo, list[TLineNo]]:
218222 branch_lines = set (self ._branch_lines ())
219223 eba = collections .defaultdict (list )
220224 for l1 , l2 in self .arcs_executed :
221- assert l1 != l2 , f"executed_branch_arcs({ self .filename !r} ): ({ l1 } , { l2 } )"
225+ assert l1 != l2
226+ if l1 == l2 :
227+ import contextlib , sys
228+ with open (f"/tmp/l1l2-{ sys .version_info [1 ]} .out" , "a" ) as f :
229+ with contextlib .redirect_stdout (f ):
230+ print (f"executed_branch_arcs({ self .filename !r} ): ({ l1 } , { l2 } )" )
222231 if (l1 , l2 ) not in self .arc_possibilities_set :
223232 continue
224233 if l1 in branch_lines :
You can’t perform that action at this time.
0 commit comments