def test_write_dot_graph_very_very_fast_function(self): code = self.make_code_object() profile_entry = namedtuple('profile_entry', 'code totaltime calls') with patch.object(builtins, 'open', lambda *a: StringIO()): data = [profile_entry(code=code, totaltime=1, calls=[])] tree = {'somefunc sourcefile.py:2': dict(cost=0)} write_dot_graph(data, tree, 'filename.gv')
def test_write_dot_graph_very_very_fast_function(self): code = self.make_code_object() profile_entry = namedtuple("profile_entry", "code totaltime calls") with patch.object(builtins, "open", lambda *a: StringIO()) as output: data = [profile_entry(code=code, totaltime=1, calls=[])] tree = {"somefunc sourcefile.py:2": dict(cost=0)} write_dot_graph(data, tree, "filename.gv")